OffsetExtensions extension

Extension on Offset to provide scaling functionalities.

This extension allows for scaling an Offset to and from a standard canvas size. The standard canvas size is defined by standardWidth and standardHeight.

on

Methods

scaleFromStandard(Size deviceCanvasSize) Offset

Available on Offset, provided by the OffsetExtensions extension

Scales the current Offset from a standard canvas size to the device canvas size.
scaleToStandard(Size deviceCanvasSize) Offset

Available on Offset, provided by the OffsetExtensions extension

Scales the current Offset to a standard canvas size.

Constants

standardHeight → const double
Standard height of the canvas.
standardWidth → const double
Standard width of the canvas.