Canvas
Offscreen drawing.
| Module | require("gui") |
| Type | Class |
Class methods
create(size, scaleFactor)
Create a new canvas with specified size and scale factor.
Parameters
SizeFsizeNumberscaleFactor
Return
CanvascreateForMainScreen(size)
Create a new canvas with size using default scale factor.
This is strongly discouraged for using, since it does not work well with multi-monitor setup. Only use it when you do not care about per-monitor DPI.
Parameters
SizeFsize
Return
CanvasMethods
getScaleFactor()
Return the scale factor of the canvas.
Return
NumbergetPainter()
Return the Painter that can be used to draw on the canvas.
Return
PaintergetSize()
Return the DIP size of canvas.
Return
SizeF