Last active
September 18, 2016 07:49
-
-
Save peteruhnak/2427c520e9fffd75cebb10fa1ab23400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"For more than 1 depth stencilling (form with alpha for example). use rule 37" | |
| stencil blitter output color | | |
color := Color orange. | |
stencil := Form extent: 32@32 depth: 32. | |
(FormCanvas on: stencil) | |
fillOval: (1@1 corner: 31@31) | |
color: (Color white alpha: 0.5) | |
borderWidth: 3 | |
borderColor: (Color white alpha: 0.8). | |
output := Form extent: 32@32 depth: 32. | |
output fill: output boundingBox fillColor: color. | |
blitter := BitBlt toForm: output. | |
blitter sourceForm: stencil; | |
combinationRule: 37; | |
sourceRect: stencil boundingBox; | |
copyBits. | |
output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"thx @latsabben" | |
| stencil output | | |
stencil := Form extent: 32@32. | |
(FormCanvas on: stencil) | |
fillOval: (1@1 corner: 31@31) | |
color: Color transparent | |
borderWidth: 3 | |
borderColor: Color black. | |
output := Form extent: 32@32 depth: 32. | |
(FormCanvas on: output) | |
fillColor: Color gray; | |
stencil: stencil | |
at: 0@0 | |
color: Color orange. | |
output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment