←Select platform

GetCurvePoints Method

Summary
Updates the curve array based on a curve or lines that pass through the specified points.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public static int GetCurvePoints( 
   int[] curve, 
   LeadPoint[] userPoints, 
   CurvePointsType type 
) 
+ (NSUInteger)getCurvePoints:(int *)curve 
                  userPoints:(const LeadPoint *)userPoints 
             userPointsCount:(NSUInteger)userPointsCount 
                        type:(LTCurvePointsType)type 
                       error:(NSError **)error 
public static int getCurvePoints( 
   int[] curve, 
   LeadPoint[] userPoints, 
   CurvePointsType type 
); 
public: 
static int GetCurvePoints(  
   array<int>^ curve, 
   array<LeadPoint>^ userPoints, 
   CurvePointsType type 
)  
def GetCurvePoints(self,curve,] userPoints,type): 

Parameters

curve
Array of integers to be filled by this method. To get the real value of the array elements, each of the values must be divided by 1000.

userPoints
Array of LeadPoint structures that contain the points on the curve used to determine the values of curve array. The minimum x coordinate value is 0.

type
Flag that indicates the method to be used to update the curve array.

Return Value

return the number of entries in curve array that were actually updated by this method.

Remarks
  • This method will update curve array using either the best curve or lines that pass through the points specified in the userPoints array. The points in the array may be sorted or not. In most cases, this method is used with the FreeHandShearCommand, or FreeHandWaveCommand .
  • To compute the size of the curve array: Size = Maximum (userPoint.X) + userPoints.Length; This means that the user needs to find the maximum x coordinate value out of userPoint and add the number of Points (userPoints.Length) sent to the method.

  • It is recommended to initialize the array curve before sending it to the function.

  • The values stored in curve represent the y coordinates of the calculated curve based on the points in the userPoint array. In the curve array there can be only one y value for each x coordinate. Therefore, circles, ellipses, and spirals cannot be represented by curve.
  • The x coordinates for the user points are sorted internally automatically.
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.ImageProcessing.Effects Assembly

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