←Select platform

SnapPointToGrid Method

Summary
Snaps the specified point to the container grid based on SnapToGridOptions.
Syntax
C#
Objective-C
C++/CLI
Python
public virtual LeadPointD SnapPointToGrid( 
   LeadPointD position, 
   bool clipToContainer 
) 
- (LeadPointD)snapPointToGrid:(LeadPointD)position clipToContainer:(BOOL)clipToContainer; 
public:  
   virtual LeadPointD^ SnapPointToGrid( 
      LeadPointD^ position, 
      bool clipToContainer 
   ) 
def SnapPointToGrid(self,position,clipToContainer): 

Parameters

position
Point to snap.

clipToContainer
A Boolean value to specify if we want to clip the point to container bounds after snap or no.

Return Value

point snapped to the container grid based on SnapToGridOptions.

Remarks

This method will snap the input point to the nearest point determined by the container grid.

This method depends on EnableSnap property. If it is set to true, it will snap the specified point, otherwise this method will return the same values for the input point.

This method depends on the SnapToGridOptions values to calculate each grid cell and for snaping the specified point.

Override this behavior by overriding the SnapPointToGrid method.

Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Designers Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.