Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: sky/sdk/lib/rendering/README.md

Issue 1217933002: Rename RenderCanvas to PaintingCanvas to avoid confusion with other classes that inherit from Rende… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/sdk/example/rendering/touch_demo.dart ('k') | sky/sdk/lib/rendering/block.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 26 matching lines...) Expand all
37 37
38 * Implementations of `performLayout` are expected to call `layout` on their 38 * Implementations of `performLayout` are expected to call `layout` on their
39 children. When calling `layout`, a `RenderObject` must use the 39 children. When calling `layout`, a `RenderObject` must use the
40 `parentUsesSize` parameter to declare whether its `performLayout` function 40 `parentUsesSize` parameter to declare whether its `performLayout` function
41 depends on information read from the child. If the parent doesn't declare 41 depends on information read from the child. If the parent doesn't declare
42 that it uses the child's size, the edge from the parent to the child becomes 42 that it uses the child's size, the edge from the parent to the child becomes
43 a _relayout boundary_, which means the child (and its subtree) might undergo 43 a _relayout boundary_, which means the child (and its subtree) might undergo
44 layout without the parent undergoing layout. 44 layout without the parent undergoing layout.
45 45
46 * Subclasses of `RenderObject` must implement a `paint` function that draws a 46 * Subclasses of `RenderObject` must implement a `paint` function that draws a
47 visual representation of the object onto a `RenderCanvas`. If 47 visual representation of the object onto a `PaintingCanvas`. If
48 the `RenderObject` has children, the `RenderObject` is responsible for 48 the `RenderObject` has children, the `RenderObject` is responsible for
49 painting its children using the `paintChild` function on the `RenderCanvas`. 49 painting its children using the `paintChild` function on the
50 `PaintingCanvas`.
50 51
51 * Subclasses of `RenderObject` must call `adoptChild` whenever they add a 52 * Subclasses of `RenderObject` must call `adoptChild` whenever they add a
52 child. Similarly, they must call `dropChild` whenever they remove a child. 53 child. Similarly, they must call `dropChild` whenever they remove a child.
53 54
54 * Most subclasses of `RenderObject` will implement a `hitTest` function that 55 * Most subclasses of `RenderObject` will implement a `hitTest` function that
55 lets clients query the render tree for objects that intersect with a given 56 lets clients query the render tree for objects that intersect with a given
56 user input location. `RenderObject` itself does not impose a particular 57 user input location. `RenderObject` itself does not impose a particular
57 type signature on `hitTest`, but most implementations will take an argument 58 type signature on `hitTest`, but most implementations will take an argument
58 of type `HitTestResult` (or, more likely, a model-specific subclass of 59 of type `HitTestResult` (or, more likely, a model-specific subclass of
59 `HitTestResult`) as well as an object that describes the location at which 60 `HitTestResult`) as well as an object that describes the location at which
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 363
363 * Avoid using save/restore on canvases. 364 * Avoid using save/restore on canvases.
364 365
365 366
366 Dependencies 367 Dependencies
367 ------------ 368 ------------
368 369
369 * [`package:sky/base`](../base) 370 * [`package:sky/base`](../base)
370 * [`package:sky/mojo`](../mojo) 371 * [`package:sky/mojo`](../mojo)
371 * [`package:sky/animation`](../mojo) 372 * [`package:sky/animation`](../mojo)
OLDNEW
« no previous file with comments | « sky/sdk/example/rendering/touch_demo.dart ('k') | sky/sdk/lib/rendering/block.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698