Skip to content

CanvasView

Record struct in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll

The view of a node canvas: screen = canvas units * CanvasView.Zoom + pan.

public readonly record struct CanvasView(double Zoom, double PanX, double PanY)

Parameters

  • Zoom: The zoom: 1 is one screen pixel per canvas unit.
  • PanX: The screen x of the canvas origin.
  • PanY: The screen y of the canvas origin.
double PanX { get; init; }

The screen x of the canvas origin.

double PanY { get; init; }

The screen y of the canvas origin.

double Zoom { get; init; }

The zoom: 1 is one screen pixel per canvas unit.

Point ToScreen(Point world)

A point in canvas units on the screen.

Point ToWorld(Point screen)

A screen point in canvas units.