Options for annotation snap to grid behavior in annotation automation design mode.
public class AnnSnapToGridOptions
Public Class AnnSnapToGridOptions
public sealed class AnnSnapToGridOptions
public class AnnSnapToGridOptions
function Leadtools.Annotations.Core.AnnSnapToGridOptions()
The AnnSnapToGridOptions class is used with the Leadtools.Annotations.Automation.AnnAutomationManager.SnapToGridOptions property to get or set the annotation snap to grid behavior in annotation automation design mode. You can then enable or disable snapping to grid by using the EnableSnap property, also you can control showing or hiding snap grid using ShowGrid property.
The snap-to-grid feature is used in annotation automation design mode to allow the user to precisely draw, locate, and align annotation objects. When snap-to-grid is enabled (EnableSnap is set to true) and the property ShowGrid is set to true, a grid pattern consisting of dots and lines is overlayed on the image being annotated. When creating annotations in design mode, each point snaps to the nearest grid point. This behavior holds for creating any annotation object except the freehand annotation. When creating a freehand annotation, the individual points do not snap to the nearest grid point because this would adversely affect the behavior of the freehand. The snap-to-grid feature affects the moving of all annotations object types in design mode, in that the bounding box of the annotation object snaps to the nearest grid point.
The grid that is overlayed can be customized by color (GridStroke), grid spacing (GridLength), and line frequency (LineSpacing). For example, to display a red grid that has a dot pattern every 30 pixels, you would set:
GridStroke.Stroke = AnnSolidColorBrush.Create("red")
LineSpacing = 30
The lines of the grid can be drawn in any style (AnnStroke). The grid itself can be hidden by setting ShowGrid to false. so that the snap-to-grid feature is still on without the grid being overlaid on the image. Conversely, the grid can be displayed by setting ShowGrid to true while disabling the snap-to-grid-behavior by setting EnableSnap to false.
Products |
Support |
Feedback: AnnSnapToGridOptions Class - Leadtools.Annotations.Core |
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.