Click or drag to resize

ZoomPanelGetViewboxFromCenterAndZoomFactor Method

Returns viewbox as Rect from the specified centerPosition, its units and zoomFactor.

Namespace:  Ab2d.Controls
Assembly:  Ab2d.Controls.ZoomPanel (in Ab2d.Controls.ZoomPanel.dll) Version: 5.2.6631.1040
Syntax
C#
public Rect GetViewboxFromCenterAndZoomFactor(
	Point centerPosition,
	ZoomPanelCenterPositionUnitsType units,
	double zoomFactor
)

Parameters

centerPosition
Type: System.WindowsPoint
centerPosition as Point
units
Type: Ab2d.ControlsZoomPanelCenterPositionUnitsType
units as CenterPositionUnitsType
zoomFactor
Type: SystemDouble
zoomFactor as double

Return Value

Type: Rect
viewbox as Rect
Remarks

GetViewboxFromCenterAndZoomFactor method returns viewbox as Rect from the specified centerPosition, its units and zoomFactor.

Note that if absolute units are used for center position, the DesiredSize of the currently set ZoomPanel's content is used to calculate absolute values from relative values.

If viewbox cannot be get (for example when there is no content set), an Empty Rect is returned.

See Also