Canvas.getXPosFromScreen

Get the horizontal position on the canvas that relates to a particular horizontal position on screen.

class Canvas
int
getXPosFromScreen
(,
int gridSpacing = 1
)

Parameters

screenXPos int

The horizontal screen position to transpose.

gridSpacing int

The grid spacing to round it to.

Return Value

Type: int

The horizontal canvas position.

Meta