Canvas

Offscreen drawing.

Modulerequire("yue.gui")
TypeClass

Class methods

create(size, scalefactor)

Create a new canvas with specified size and scale factor.

Parameters

Return

Canvas

createformainscreen(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

Return

Canvas

Methods

getscalefactor()

Return the scale factor of the canvas.

Return

number

getpainter()

Return the Painter that can be used to draw on the canvas.

Return

Painter

getsize()

Return the DIP size of canvas.

Return

SizeF