ZoomPanelSetZoom Method |
Name | Description | |
---|---|---|
![]() | SetZoom(Double) |
Sets the zoom area to the currently set CenterPosition and the zoomFactor parameter. If IsAnimated property is true, the zoom area change is animated.
|
![]() | SetZoom(Point) |
Sets the zoom area to centerPosition parameter (in the current CenterPositionUnits) and the currently set ZoomFactor. If IsAnimated property is true, the zoom area change is animated.
|
![]() ![]() | SetZoom(Rect) |
Sets the zoom area to the new viewbox. If IsAnimated property is true, the zoom area change is animated.
|
![]() | SetZoom(Point, Double) |
Sets the zoom area to centerPosition parameter (in the current CenterPositionUnits) and the zoomFactor parameter. If IsAnimated property is true, the zoom area change is animated.
|
![]() | SetZoom(Rect, Double) |
Sets the zoom area to the new viewbox. If IsAnimated property is true, the zoom area change is animated.
|
![]() | SetZoom(Point, ZoomPanelCenterPositionUnitsType, Double) |
Sets the zoom area based on centerPosition, units and zoomFactor parameters. If IsAnimated property is true, the viewbox change is animated.
|
![]() | SetZoom(Point, ZoomPanelCenterPositionUnitsType, Double, Double) |
Sets the zoom area based on centerPosition, units and zoomFactor parameters. If IsAnimated property is true, the viewbox change is animated.
|
![]() | SetZoom(Point, ZoomPanelCenterPositionUnitsType, Double, Double, Boolean, Boolean) |
Sets the zoom from the centerPosition and zoomFactor.
|
SetZoom is the most common method to change the area visible with ZoomPanel.
If IsAnimated property is true, the zoom area change is animated. The SetZoomNow method is similar to this method except that the change is not animated.
The method has many overloads that can be used to specify the new visible area by new viewbox, rotation angle, zoom factor and center position.
The following example sets the new visible area to the right upper quarter of the content (position: 0.5, 0; size: 0.5, 0.5):
ZoomPanel1.SetZoom(new Rect(0.5, 0, 0.5, 0.5));
The following example shows the same area but this time set with using zoom factor (4) and center position (0.75, 0.25):
ZoomPanel1.SetZoom(new Point(0.75, 0.25), Ab2d.Controls.ZoomPanel.CenterPositionUnitsType.Relative, 4);