Gets or sets the scale factor used to zoom the image in the viewer around the center when CenterAtPoint is called.
[DefaultValueAttribute()][DescriptionAttribute("The zoom factor used when calling CenterAtPoint or when the interactive mode was set to ZoomAt. A value of 1 = no scale. A value greater than 1 will zoom the image around the center point by that amount. A value less than 1 will zoom the image around the center point by that amount.")][CategoryAttribute("Behavior")]public virtual double CenterZoomAtPointScaleFactor {get; set;}
<DefaultValueAttribute()><DescriptionAttribute("The zoom factor used when calling CenterAtPoint or when the interactive mode was set to ZoomAt. A value of 1 = no scale. A value greater than 1 will zoom the image around the center point by that amount. A value less than 1 will zoom the image around the center point by that amount.")><CategoryAttribute("Behavior")>Public Overridable Property CenterZoomAtPointScaleFactor As Double
[DefaultValueAttribute()][DescriptionAttribute("The zoom factor used when calling CenterAtPoint or when the interactive mode was set to ZoomAt. A value of 1 = no scale. A value greater than 1 will zoom the image around the center point by that amount. A value less than 1 will zoom the image around the center point by that amount.")][CategoryAttribute("Behavior")]public:virtual property double CenterZoomAtPointScaleFactor {double get();void set ( double );}
The scale factor used to display the magnified image. Must be a value greater than 0. Default value is 1 (no zoom).
Use the value of CenterZoomAtPointScaleFactor to perform zooming of the image around the center point when calling CenterAtPoint:
If the value of CenterZoomAtPointScaleFactor is 1 (the default value), then no zooming is performed
If the value of CenterZoomAtPointScaleFactor is greater than 1, then this value is multiplied by the current viewer scale factor (ScaleFactor) to zoom the image in around the center point
If the value of ScaleFactor is less than 1, then this value is multiplied by the current viewer scale factor (ScaleFactor) to zoom the image out around the center point
This example will set the viewer interactive mode to "center", it will also alternate the scale factor used with each click between 2 and 0.5. When you run this example, the first click on the viewer will center the image around that point while zooming it in twice. When you click again, the viewer will center the image around that point while zommong it out twice. Subsequent clicks will repeat these operations.
Imports Leadtools.WinFormsImports LeadtoolsImports Leadtools.CodecsImports Leadtools.ImageProcessing.ColorImports Leadtools.DrawingPrivate Shared Sub CenterAtWithZoomExample(ByVal viewer As RasterImageViewer)' Make sure the viewer size mode is normalviewer.SizeMode = RasterPaintSizeMode.Normal' Set interactive mode to CenterAtviewer.InteractiveMode = RasterViewerInteractiveMode.CenterAt' Set the center at scale factor to 1, so zoom in twice with each clickviewer.CenterZoomAtPointScaleFactor = 2.0AddHandler viewer.InteractiveModeEnded, AddressOf rasterImageviewer_InteractiveModeEndedEnd SubPrivate Shared Sub rasterImageviewer_InteractiveModeEnded(ByVal sender As Object, ByVal e As EventArgs)' Check if this is the Center At interactive modeDim viewer As RasterImageViewer = CType(sender, RasterImageViewer)If viewer.InteractiveMode = RasterViewerInteractiveMode.CenterAt ThenIf viewer.CenterZoomAtPointScaleFactor = 2.0 Then' Switch the scale factor to 0.5, so next time we click, it will zoom out twiceviewer.CenterZoomAtPointScaleFactor = 0.5Else' Back to 2, so we zoom inviewer.CenterZoomAtPointScaleFactor = 2.0End IfEnd IfEnd Sub
using Leadtools.WinForms;using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing.Color;using Leadtools.Drawing;private static void CenterAtWithZoomExample(RasterImageViewer viewer){// Make sure the viewer size mode is normalviewer.SizeMode = RasterPaintSizeMode.Normal;// Set interactive mode to CenterAtviewer.InteractiveMode = RasterViewerInteractiveMode.CenterAt;// Set the center at scale factor to 1, so zoom in twice with each clickviewer.CenterZoomAtPointScaleFactor = 2.0;viewer.InteractiveModeEnded += viewer_InteractiveModeEnded;}private static void viewer_InteractiveModeEnded(object sender, EventArgs e){// Check if this is the Center At interactive modeRasterImageViewer viewer = sender as RasterImageViewer;if (viewer.InteractiveMode == RasterViewerInteractiveMode.CenterAt){if (viewer.CenterZoomAtPointScaleFactor == 2.0){// Switch the scale factor to 0.5, so next time we click, it will zoom out twiceviewer.CenterZoomAtPointScaleFactor = 0.5;}else{// Back to 2, so we zoom inviewer.CenterZoomAtPointScaleFactor = 2.0;}}}
|
Products |
Support |
Feedback: CenterZoomAtPointScaleFactor Property - Leadtools.WinForms |
Introduction |
Help Version 19.0.2017.3.22
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.