Resource Base
Table of contents

CPoint

The CPoint class represents a point in 2D space. It contains an array of two integers, which represent the coordinates of the point.

Definition

Namespace: dynamsoft::basic_structures

Assembly: DynamsoftCore

class CPoint 

Attributes Summary

Attribute Type
coordinate int[2]

Methods Summary

Method Description
TransformCoordinates Transforms the coordinates of a point using a given transformation matrix.

coordinate

The coordinate array of the point.

int coordinate[2]

TransformCoordinates

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);

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

version 3.0.0

  • Latest version (2.2.20)
  • Version 2.x
    • Version 2.2.10
    • Version 2.2.0
    • Version 2.0.30
    • Version 2.0.20
    • Version 2.0.10
    • Version 2.0.0
Change +
© 2003–2024 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support