OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 import 'dart:math' as math; | |
6 import 'dart:sky' as sky; | |
7 import 'package:sky/framework/app.dart'; | |
8 import 'package:sky/framework/rendering/box.dart'; | |
9 import 'package:sky/framework/rendering/block.dart'; | |
10 import 'package:sky/framework/rendering/node.dart'; | |
11 | |
12 AppView app; | |
13 | |
14 void main() { | |
15 | |
16 | |
17 var root = new RenderBlock(children: [ | |
18 new RenderPadding( | |
19 padding: new EdgeDims.all(10.0), | |
20 child: new RenderSizedBox( | |
21 desiredSize: new sky.Size.fromHeight(100.0), | |
22 child: new RenderDecoratedBox( | |
23 decoration: new BoxDecoration( | |
24 backgroundColor: new sky.Color(0xFFFFFF00) | |
25 ) | |
26 ) | |
27 ) | |
28 ), | |
29 new RenderPadding( | |
30 padding: new EdgeDims.all(10.0), | |
31 child: new RenderSizedBox( | |
32 desiredSize: new sky.Size.fromHeight(100.0), | |
33 child: new RenderDecoratedBox( | |
34 decoration: new BoxDecoration( | |
35 border: new Border( | |
36 top: new BorderSide(color: new sky.Color(0xFFF00000), width: 5.0), | |
37 right: new BorderSide(color: new sky.Color(0xFFFF9000), width: 10.
0), | |
38 bottom: new BorderSide(color: new sky.Color(0xFFFFF000), width: 15
.0), | |
39 left: new BorderSide(color: new sky.Color(0xFF00FF00), width: 20.0
) | |
40 ), | |
41 backgroundColor: new sky.Color(0xFFDDDDDD) | |
42 ) | |
43 ) | |
44 ) | |
45 ), | |
46 new RenderPadding( | |
47 padding: new EdgeDims.all(10.0), | |
48 child: new RenderSizedBox( | |
49 desiredSize: new sky.Size.fromHeight(100.0), | |
50 child: new RenderDecoratedBox( | |
51 decoration: new BoxDecoration( | |
52 backgroundColor: new sky.Color(0xFFFFFF00) | |
53 ) | |
54 ) | |
55 ) | |
56 ), | |
57 new RenderPadding( | |
58 padding: new EdgeDims.all(10.0), | |
59 child: new RenderSizedBox( | |
60 desiredSize: new sky.Size.fromHeight(100.0), | |
61 child: new RenderDecoratedBox( | |
62 decoration: new BoxDecoration( | |
63 backgroundColor: new sky.Color(0xFFFFFF00) | |
64 ) | |
65 ) | |
66 ) | |
67 ), | |
68 new RenderPadding( | |
69 padding: new EdgeDims.all(10.0), | |
70 child: new RenderSizedBox( | |
71 desiredSize: new sky.Size.fromHeight(100.0), | |
72 child: new RenderDecoratedBox( | |
73 decoration: new BoxDecoration( | |
74 backgroundColor: new sky.Color(0xFFFFFF00) | |
75 ) | |
76 ) | |
77 ) | |
78 ), | |
79 ]); | |
80 app = new AppView(root); | |
81 } | |
OLD | NEW |