| 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 | |
| 8 import 'package:sky/rendering/block.dart'; | |
| 9 import 'package:sky/rendering/box.dart'; | |
| 10 import 'package:sky/rendering/sky_binding.dart'; | |
| 11 | |
| 12 void main() { | |
| 13 var root = new RenderBlock(children: [ | |
| 14 new RenderPadding( | |
| 15 padding: new EdgeDims.all(10.0), | |
| 16 child: new RenderConstrainedBox( | |
| 17 additionalConstraints: new BoxConstraints.tightFor(height: 100.0), | |
| 18 child: new RenderDecoratedBox( | |
| 19 decoration: new BoxDecoration( | |
| 20 backgroundColor: new sky.Color(0xFFFFFF00) | |
| 21 ) | |
| 22 ) | |
| 23 ) | |
| 24 ), | |
| 25 new RenderPadding( | |
| 26 padding: new EdgeDims.all(10.0), | |
| 27 child: new RenderConstrainedBox( | |
| 28 additionalConstraints: new BoxConstraints.tightFor(height: 100.0), | |
| 29 child: new RenderDecoratedBox( | |
| 30 decoration: new BoxDecoration( | |
| 31 border: new Border( | |
| 32 top: new BorderSide(color: new sky.Color(0xFFF00000), width: 5.0), | |
| 33 right: new BorderSide(color: new sky.Color(0xFFFF9000), width: 10.
0), | |
| 34 bottom: new BorderSide(color: new sky.Color(0xFFFFF000), width: 15
.0), | |
| 35 left: new BorderSide(color: new sky.Color(0xFF00FF00), width: 20.0
) | |
| 36 ), | |
| 37 backgroundColor: new sky.Color(0xFFDDDDDD) | |
| 38 ) | |
| 39 ) | |
| 40 ) | |
| 41 ), | |
| 42 new RenderPadding( | |
| 43 padding: new EdgeDims.all(10.0), | |
| 44 child: new RenderConstrainedBox( | |
| 45 additionalConstraints: new BoxConstraints.tightFor(height: 100.0), | |
| 46 child: new RenderDecoratedBox( | |
| 47 decoration: new BoxDecoration( | |
| 48 backgroundColor: new sky.Color(0xFFFFFF00) | |
| 49 ) | |
| 50 ) | |
| 51 ) | |
| 52 ), | |
| 53 new RenderPadding( | |
| 54 padding: new EdgeDims.all(10.0), | |
| 55 child: new RenderConstrainedBox( | |
| 56 additionalConstraints: new BoxConstraints.tightFor(height: 100.0), | |
| 57 child: new RenderDecoratedBox( | |
| 58 decoration: new BoxDecoration( | |
| 59 backgroundColor: new sky.Color(0xFFFFFF00) | |
| 60 ) | |
| 61 ) | |
| 62 ) | |
| 63 ), | |
| 64 new RenderPadding( | |
| 65 padding: new EdgeDims.all(10.0), | |
| 66 child: new RenderConstrainedBox( | |
| 67 additionalConstraints: new BoxConstraints.tightFor(height: 100.0), | |
| 68 child: new RenderDecoratedBox( | |
| 69 decoration: new BoxDecoration( | |
| 70 backgroundColor: new sky.Color(0xFFFFFF00) | |
| 71 ) | |
| 72 ) | |
| 73 ) | |
| 74 ), | |
| 75 ]); | |
| 76 new SkyBinding(root: root); | |
| 77 } | |
| OLD | NEW |