Skip to content

Commit

Permalink
Cairo mask API: classify and improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchodias committed May 23, 2023
1 parent 3e4bf24 commit ae96a20
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Alexandrie-Cairo/AeCairoContext.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,12 @@ AeCairoContext >> lineWidth: aNumber [
double aNumber ) )
]

{ #category : #'API - clipping' }
{ #category : #'API - painting' }
AeCairoContext >> mask: pattern [
"See: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-mask"
"A drawing operator that paints the current source using the alpha channel of pattern as a mask.
(Opaque areas of pattern are painted with the source, transparent areas are not painted.)
See: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-mask"

^ self ffiCall: #(
void
Expand All @@ -727,13 +730,14 @@ AeCairoContext >> mask: pattern [

{ #category : #'API - painting' }
AeCairoContext >> maskGroupWith: aBlockClosure [
"Mask a surface that will be created in a group with the specified block closure."

self pushGroup.
aBlockClosure value.
self mask: self popGroupAsSurfacePattern
]

{ #category : #'API - clipping' }
{ #category : #'API - painting' }
AeCairoContext >> maskSurface: aSurface x: surfaceX y: surfaceY [
"A drawing operator that paints the current source using the alpha channel of surface as a mask. (Opaque areas of surface are painted with the source, transparent areas are not painted.)
Expand Down

0 comments on commit ae96a20

Please sign in to comment.