Companion

object Companion

Properties

Link copied to clipboard

The height of the canvas in pixels.

Link copied to clipboard

The width of the canvas in pixels.

Link copied to clipboard

The height of the field.

Link copied to clipboard

The width of the field.

Functions

Link copied to clipboard
fun fieldCoordsToScreenCoords(vector2d: Vector2d, canvasWidth: Double = CANVAS_WIDTH, canvasHeight: Double = CANVAS_HEIGHT): Vector2d

Converts field coordinates to screen coordinates.

Link copied to clipboard
fun scaleInchesToPixel(inches: Double, canvasWidth: Double = CANVAS_WIDTH, canvasHeight: Double = CANVAS_HEIGHT): Double

Scales inches to pixels based on canvas dimensions.

Link copied to clipboard
fun screenCoordsToFieldCoords(vector2d: Vector2d, canvasWidth: Double = CANVAS_WIDTH, canvasHeight: Double = CANVAS_HEIGHT): Vector2d

Converts screen coordinates to field coordinates.