drawbot
drawbot copied to clipboard
uncommon blendModes
What do the blend modes clear, copy, sourceIn, sourceOut, sourceAtop, destinationOver, destinationIn, destinationOut, destinationAtop, xOR, plusDarker, plusLighter actually do? Not anything, as per my testing:
blend_modes = ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'colorDodge', 'colorBurn', 'softLight', 'hardLight', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity', 'clear', 'copy', 'sourceIn', 'sourceOut', 'sourceAtop', 'destinationOver', 'destinationIn', 'destinationOut', 'destinationAtop', 'xOR', 'plusDarker', 'plusLighter']
for blend_mode in blend_modes:
newPage(100, 100)
blendMode(blend_mode)
fill(1, 0, 0, 1)
rect(10, 10, 70, 70)
fill(0, 0, 1, 1)
rect(20, 20, 70, 70)
fill(1)
blendMode('normal')
font('.SFNSMono-Regular')
text(
blend_mode,
(width()/2, height()/2),
align='center'
)
see https://developer.apple.com/documentation/coregraphics/cgblendmode?language=objc
some work beter with images or "more" colors..
some dont work in quartz like xOR
(side note: in future version of DB . dotFont will not be supported anymore, use the proper font ps name, see)