~eliasnaur/giouiorg

308259a62e02ea55543b45b9bec9acb33911a2fd — Chris Waldon 9 months ago 8b0179a
content/doc/architecture: remove obsolete text about Add

The content referred to clip.Op.Add, which is removed in
favor of Push/Pop.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
1 files changed, 1 insertions(+), 3 deletions(-)

M content/doc/architecture/drawing.md
M content/doc/architecture/drawing.md => content/doc/architecture/drawing.md +1 -3
@@ 33,8 33,6 @@ In some cases we want the drawing to be confined to a non-rectangular shape, for

<pre style="min-height: 100px" data-run="wasm" data-pkg="architecture" data-args="draw-clip" data-size="200x100"></pre>

Note: that we first need to get the actual operation for the clipping with `Op` before calling `Add`. This level of indirection is useful if we want to use the same clipping operation multiple times. Under the hood, Op records a [macro](#macros) that encodes the clipping path.

For more complex clipping [`clip.Path`](https://gioui.org/op/clip#Path) can express shapes built from lines and bézier curves. This example draws a triangle with a curved edge:

<{{files/architecture/draw.go}}[/START CLIP TRIANGLE OMIT/,/END CLIP TRIANGLE OMIT/]


@@ 122,4 120,4 @@ Note that [`image.NRGBA`](https://golang.org/pkg/image#NRGBA) and [`image.Unifor

<pre style="min-height: 100px" data-run="wasm" data-pkg="architecture" data-args="draw-image" data-size="200x100"></pre>

The image must not be mutated until another [`FrameEvent`](https://gioui.org/io/system#FrameEvent) happens, because the image may be read asynchronously while the frame is being drawn.
\ No newline at end of file
The image must not be mutated until another [`FrameEvent`](https://gioui.org/io/system#FrameEvent) happens, because the image may be read asynchronously while the frame is being drawn.