Skip to content
API referenceDevelopmentEditor scriptingEngine ccf7d03f
Synced
  • Changes the screen-space origin so zoom preserves the same content point beneath the cursor.

API: scripting
Project: Inno.Editor.Interactions
Scope: Editor

public static System.Numerics.Vector2 InnoEditor.Interactions.EditorPlanarNavigation.ZoomOrigin(System.Numerics.Vector2 origin, System.Numerics.Vector2 pivot, float previousScale, float nextScale)

Parameter origin: Current logical-pixel content origin.

Parameter pivot: Logical-pixel cursor position relative to the canvas.

Parameter previousScale: Previous positive content magnification.

Parameter nextScale: New positive content magnification after clamping.

The origin preserving the pivot’s content coordinate.

Exception T:System.ArgumentOutOfRangeException: An input is non-finite or a scale is not positive.