layout | title | description | keywords | needAutoGenerateSidebar |
---|---|---|---|---|
default-layout |
class CPoint - Dynamsoft Core Module C++ Edition API Reference |
This page shows the C++ edition of the class CPoint in Dynamsoft Core Module. |
point, c++ |
true |
The CPoint class represents a point in 2D space. It contains an array of two integers, which represent the coordinates of the point.
Namespace: dynamsoft::basic_structures
Assembly: DynamsoftCore
class CPoint
Attribute | Type |
---|---|
coordinate |
int[2] |
Method | Description |
---|---|
TransformCoordinates |
Transforms the coordinates of a point using a given transformation matrix. |
The coordinate array of the point.
int coordinate[2]
Transforms the coordinates of a point using a given transformation matrix.
static CPoint TransformCoordinates(CPoint originalPoint, double transformationMatrix[9])
Parameters
[in] originalPoint
The original point to transform.
[in] transformationMatrix
The transformation matrix to apply to the coordinates.
Return value
Returns a new CPoint object with the transformed coordinates.
Code Snippet
CPoint originalPoint;
originalPoint.coordinate[0] = 10;
originalPoint.coordinate[1] = 20;
double transformationMatrix[9] = {1, 0, 0, 0, 2, 0, 0, 0, 1};
CPoint transformedPoint = CPoint::TransformCoordinates(originalPoint, transformationMatrix);