OLD | NEW |
1 Sky Rendering | 1 Sky Rendering |
2 ============= | 2 ============= |
3 | 3 |
4 The Sky render tree is a low-level layout and painting system based on a | 4 The Sky render tree is a low-level layout and painting system based on a |
5 retained tree of objects that inherit from [`RenderObject`](object.dart). Most | 5 retained tree of objects that inherit from [`RenderObject`](object.dart). Most |
6 developers using Sky will not need to interact directly with the rendering tree. | 6 developers using Sky will not need to interact directly with the rendering tree. |
7 Instead, most developers should use [Sky widgets](../widgets/README.md), which | 7 Instead, most developers should use [Sky widgets](../widgets/README.md), which |
8 are built using the render tree. | 8 are built using the render tree. |
9 | 9 |
10 Overview | 10 Overview |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 ### Parent Data | 78 ### Parent Data |
79 | 79 |
80 TODO(ianh): Describe the parent data concept. | 80 TODO(ianh): Describe the parent data concept. |
81 | 81 |
82 The `setParentData()` method is automatically called for each child | 82 The `setParentData()` method is automatically called for each child |
83 when the child's parent is changed. However, if you need to | 83 when the child's parent is changed. However, if you need to |
84 preinitialise the `parentData` member to set its values before you add | 84 preinitialise the `parentData` member to set its values before you add |
85 a node to its parent, you can preemptively call that future parent's | 85 a node to its parent, you can preemptively call that future parent's |
86 `setParentData()` method with the future child as the argument. | 86 `setParentData()` method with the future child as the argument. |
87 | 87 |
| 88 TODO(ianh): Discuss putting per-child configuration information for |
| 89 the parent on the child's parentData. |
| 90 |
| 91 If you change a child's parentData dynamically, you must also call |
| 92 markNeedsLayout() on the parent, otherwise the new information will |
| 93 not take effect until something else triggers a layout. |
| 94 |
88 ### Box Model | 95 ### Box Model |
89 | 96 |
90 #### Dimensions | 97 #### Dimensions |
91 | 98 |
92 All dimensions are expressed as logical pixel units. Font sizes are | 99 All dimensions are expressed as logical pixel units. Font sizes are |
93 also in logical pixel units. Logical pixel units are approximately | 100 also in logical pixel units. Logical pixel units are approximately |
94 96dpi, but the precise value varies based on the hardware, in such a | 101 96dpi, but the precise value varies based on the hardware, in such a |
95 way as to optimise for performance and rendering quality while keeping | 102 way as to optimise for performance and rendering quality while keeping |
96 interfaces roughly the same size across devices regardless of the | 103 interfaces roughly the same size across devices regardless of the |
97 hardware pixel density. | 104 hardware pixel density. |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 359 |
353 * Avoid using save/restore on canvases. | 360 * Avoid using save/restore on canvases. |
354 | 361 |
355 | 362 |
356 Dependencies | 363 Dependencies |
357 ------------ | 364 ------------ |
358 | 365 |
359 * [`package:sky/base`](../base) | 366 * [`package:sky/base`](../base) |
360 * [`package:sky/mojo`](../mojo) | 367 * [`package:sky/mojo`](../mojo) |
361 * [`package:sky/animation`](../mojo) | 368 * [`package:sky/animation`](../mojo) |
OLD | NEW |