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

API: engine
Project: Inno.Editor.Interactions

public static System.Numerics.Vector2 Inno.Editor.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.