docs » hs.canvas.drawing
An wrapper to replace hs.drawing
with hs.canvas
.
The intention is for this wrapper to provide all of the same functionality that hs.drawing
does without requiring any additional changes to your currently existing code.
-
images which are "template images" (i.e. some of the images with names in
hs.image.systemImageNames
and any image retrieved from anhs.menubar
object) are displayed with an implicitimageAlpha
of 0.5. This closely mimics the NSImageView behavior observed withhs.drawing
, but since Apple has not provided full details on how a template image is rendered when it is not used as a template, this is just a guess. -
image frames from
hs.drawing
are approximated with additional canvas elements inserted into the canvas; since this module now allows you to create as complex a frame as you like... consider these as "examples".
The wrapper is not enabled by default. See the hs.canvas.drawingWrapper
function for details on how to enable or disable this wrapper.
- Functions - API calls offered directly by the extension
- drawingWrapper
Signature | hs.canvas.drawingWrapper([state]) -> boolean |
---|---|
Type | Function |
Description | Get or set whether or not hs.drawing is replaced by a wrapper which uses this module. |
Parameters |
|
Returns |
|
Notes |
|