Skip to content

Commit

Permalink
quick update on AeCanvas and clipping
Browse files Browse the repository at this point in the history
  • Loading branch information
rvillemeur committed Oct 17, 2024
1 parent d2618e8 commit 0d608f2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Chapters/bloc/element.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ Element geometry is taken care by the method `aeDrawGeometryOn: aeCanvas`.
Painting is done on an Alexandrie canvas, then rendered on the host
by the method `BARenderer (BlHostRenderer) >> render: aHostSpace` which displays it on a `AeCairoImageSurface`.

AeCanvas, not to confused with AlexandrieCanvas, is a specific canvas for Bloc,
designed to render geometrical figures on a Cairo surface.

Drawing is done through method 'xxx', which receives an Alexandrie
(vector) canvas (`AeCanvas`) as an argument.

Expand All @@ -497,6 +500,11 @@ drawFigureAndPrepareToClip: true
ou
drawFigure. which set clip to false.

Clipping is restricting of drawing to a certain area. This is done for efficiency
reasons and to create interesting effects.

Note: Background MUST be set BEFORE border.

Drawing example - draw hour tick around a circle
```
aeDrawOn: aeCanvas
Expand Down

0 comments on commit 0d608f2

Please sign in to comment.