PDF Toolbox
Loading...
Searching...
No Matches
Macros | Functions
PdfToolbox_PtxGeomReal.h File Reference
#include "PdfToolbox_Types.h"
#include "PdfToolbox_PtxSys.h"

Go to the source code of this file.

Macros

#define PDFTOOLBOX_CALL
 

Functions

PDFTOOLBOX_EXPORT TPtxGeomReal_QuadrilateralList *PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_New (void)
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_GetCount (TPtxGeomReal_QuadrilateralList *pQuadrilateralList)
 Get the number of elements in the list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Get (TPtxGeomReal_QuadrilateralList *pQuadrilateralList, int iIndex, TPtxGeomReal_Quadrilateral *pQuadrilateral)
 Returns the element at the specified position in the given list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Add (TPtxGeomReal_QuadrilateralList *pQuadrilateralList, const TPtxGeomReal_Quadrilateral *pQuadrilateral)
 Add an element to the end of the list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Clear (TPtxGeomReal_QuadrilateralList *pQuadrilateralList)
 Clear list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Remove (TPtxGeomReal_QuadrilateralList *pQuadrilateralList, int iIndex)
 Remove certain element from list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Set (TPtxGeomReal_QuadrilateralList *pQuadrilateralList, int iIndex, const TPtxGeomReal_Quadrilateral *pValue)
 Update certain element in list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Translate (TPtxGeomReal_AffineTransform *pAffineTransform, double tx, double ty)
 Translate. Translations are specified as [1 0 0 1 tx ty], where tx and ty are the distances to translate the origin of the coordinate system in the horizontal and vertical dimensions, respectively.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Scale (TPtxGeomReal_AffineTransform *pAffineTransform, double sx, double sy)
 Scale. Scaling is obtained by [sx 0 0 sy 0 0]. This scales the coordinates so that 1 unit in the horizontal and vertical dimensions of the new coordinate system is the same size as sx and sy units, respectively, in the previous coordinate system.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Rotate (TPtxGeomReal_AffineTransform *pAffineTransform, double dAngle, const TPtxGeomReal_Point *pCenter)
 Rotate.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Skew (TPtxGeomReal_AffineTransform *pAffineTransform, double dAlpha, double dBeta)
 Skew. Skew is specified by [1 tan a tan b 1 0 0], which skews the x axis by an angle a and the y axis by an angle b.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Concatenate (TPtxGeomReal_AffineTransform *pAffineTransform, const TPtxGeomReal_AffineTransform *pOther)
 Concatenate transform with other transform. Concatenating a transform with an other transform is equivalent to left-multiplying the transform's matrix with with the other transform's matrix.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Invert (TPtxGeomReal_AffineTransform *pAffineTransform)
 Invert the transform A transform usually maps from the transformed coordinate system to the untransformed coordinate system. Use this method to create the reverse transform.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_TransformPoint (TPtxGeomReal_AffineTransform *pAffineTransform, const TPtxGeomReal_Point *pOriginal, TPtxGeomReal_Point *pPoint)
 Transforms the given point.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_TransformRectangle (TPtxGeomReal_AffineTransform *pAffineTransform, const TPtxGeomReal_Rectangle *pOriginal, TPtxGeomReal_Quadrilateral *pQuadrilateral)
 Transform the given rectangle For a general affine transformation, the returned TPtxGeomReal_Quadrilateral is a parallelogram.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_TransformQuadrilateral (TPtxGeomReal_AffineTransform *pAffineTransform, const TPtxGeomReal_Quadrilateral *pOriginal, TPtxGeomReal_Quadrilateral *pQuadrilateral)
 Transform a given quadrilateral If the input quadrilateral is a parallelogram, then the output is also a parallelogram.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_GetIdentity (TPtxGeomReal_AffineTransform *pIdentity)
 The identity transform.
 

Macro Definition Documentation

◆ PDFTOOLBOX_CALL

#define PDFTOOLBOX_CALL

Function Documentation

◆ PtxGeomReal_AffineTransform_Concatenate()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Concatenate ( TPtxGeomReal_AffineTransform * pAffineTransform,
const TPtxGeomReal_AffineTransform * pOther )

Concatenate transform with other transform. Concatenating a transform with an other transform is equivalent to left-multiplying the transform's matrix with with the other transform's matrix.

Parameters
[in,out]pAffineTransformThe pointer to the struct of type TPtxGeomReal_AffineTransform to which this function acts on.
[in]pOtherthe transform to be concatenated to this transform
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_AffineTransform_GetIdentity()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_GetIdentity ( TPtxGeomReal_AffineTransform * pIdentity)

The identity transform.

Parameters
[out]pIdentityRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxGeomReal_AffineTransform_Invert()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Invert ( TPtxGeomReal_AffineTransform * pAffineTransform)

Invert the transform A transform usually maps from the transformed coordinate system to the untransformed coordinate system. Use this method to create the reverse transform.

Parameters
[in,out]pAffineTransformThe pointer to the struct of type TPtxGeomReal_AffineTransform to which this function acts on.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_AffineTransform_Rotate()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Rotate ( TPtxGeomReal_AffineTransform * pAffineTransform,
double dAngle,
const TPtxGeomReal_Point * pCenter )

Rotate.

Rotations are produced by [cos(a) sin(a) -sin(a) cos(a) 0 0], which has the effect of rotating the coordinate system axes by an angle "a" in counterclockwise direction around the origin.

If the given pCenter is not NULL, then the rotation is performed around the given center point, which is equivalent to the following sequence:

Parameters
[in,out]pAffineTransformThe pointer to the struct of type TPtxGeomReal_AffineTransform to which this function acts on.
[in]dAngleThe angle of the rotation in degrees.
[in]pCenterThe center of the rotation. If NULL then the origin (0/0) is taken as center.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_AffineTransform_Scale()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Scale ( TPtxGeomReal_AffineTransform * pAffineTransform,
double sx,
double sy )

Scale. Scaling is obtained by [sx 0 0 sy 0 0]. This scales the coordinates so that 1 unit in the horizontal and vertical dimensions of the new coordinate system is the same size as sx and sy units, respectively, in the previous coordinate system.

Parameters
[in,out]pAffineTransformThe pointer to the struct of type TPtxGeomReal_AffineTransform to which this function acts on.
[in]sxhorizontal scale factor
[in]syvertical scale factor
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_AffineTransform_Skew()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Skew ( TPtxGeomReal_AffineTransform * pAffineTransform,
double dAlpha,
double dBeta )

Skew. Skew is specified by [1 tan a tan b 1 0 0], which skews the x axis by an angle a and the y axis by an angle b.

Parameters
[in,out]pAffineTransformThe pointer to the struct of type TPtxGeomReal_AffineTransform to which this function acts on.
[in]dAlphaangle a in degrees
[in]dBetaangle b in degrees
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_AffineTransform_TransformPoint()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_TransformPoint ( TPtxGeomReal_AffineTransform * pAffineTransform,
const TPtxGeomReal_Point * pOriginal,
TPtxGeomReal_Point * pPoint )

Transforms the given point.

Parameters
[in,out]pAffineTransformThe pointer to the struct of type TPtxGeomReal_AffineTransform to which this function acts on.
[in]pOriginalthe point to be transformed
[out]pPointthe transformed point
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_AffineTransform_TransformQuadrilateral()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_TransformQuadrilateral ( TPtxGeomReal_AffineTransform * pAffineTransform,
const TPtxGeomReal_Quadrilateral * pOriginal,
TPtxGeomReal_Quadrilateral * pQuadrilateral )

Transform a given quadrilateral If the input quadrilateral is a parallelogram, then the output is also a parallelogram.

Parameters
[in,out]pAffineTransformThe pointer to the struct of type TPtxGeomReal_AffineTransform to which this function acts on.
[in]pOriginalthe quadrilateral to be transformed
[out]pQuadrilateralthe transformed quadrilateral. If the input is a parallelogram then the output is also a parallelogram.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_AffineTransform_TransformRectangle()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_TransformRectangle ( TPtxGeomReal_AffineTransform * pAffineTransform,
const TPtxGeomReal_Rectangle * pOriginal,
TPtxGeomReal_Quadrilateral * pQuadrilateral )

Transform the given rectangle For a general affine transformation, the returned TPtxGeomReal_Quadrilateral is a parallelogram.

Parameters
[in,out]pAffineTransformThe pointer to the struct of type TPtxGeomReal_AffineTransform to which this function acts on.
[in]pOriginalthe rectangle to be transformed
[out]pQuadrilateralthe transformed rectangle. For a general affine transform this is a parallelogram.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_AffineTransform_Translate()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_AffineTransform_Translate ( TPtxGeomReal_AffineTransform * pAffineTransform,
double tx,
double ty )

Translate. Translations are specified as [1 0 0 1 tx ty], where tx and ty are the distances to translate the origin of the coordinate system in the horizontal and vertical dimensions, respectively.

Parameters
[in,out]pAffineTransformThe pointer to the struct of type TPtxGeomReal_AffineTransform to which this function acts on.
[in]txhorizontal translation
[in]tyvertical translation
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_QuadrilateralList_Add()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Add ( TPtxGeomReal_QuadrilateralList * pQuadrilateralList,
const TPtxGeomReal_Quadrilateral * pQuadrilateral )

Add an element to the end of the list.

Parameters
[in,out]pQuadrilateralListActs as a handle to the native object of type TPtxGeomReal_QuadrilateralList.
[in]pQuadrilateral
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_QuadrilateralList_Clear()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Clear ( TPtxGeomReal_QuadrilateralList * pQuadrilateralList)

Clear list.

Parameters
[in,out]pQuadrilateralListActs as a handle to the native object of type TPtxGeomReal_QuadrilateralList.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_QuadrilateralList_Get()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Get ( TPtxGeomReal_QuadrilateralList * pQuadrilateralList,
int iIndex,
TPtxGeomReal_Quadrilateral * pQuadrilateral )

Returns the element at the specified position in the given list.

Parameters
[in,out]pQuadrilateralListActs as a handle to the native object of type TPtxGeomReal_QuadrilateralList.
[in]iIndex
[out]pQuadrilateral
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_QuadrilateralList_GetCount()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_GetCount ( TPtxGeomReal_QuadrilateralList * pQuadrilateralList)

Get the number of elements in the list.

Parameters
[in,out]pQuadrilateralListActs as a handle to the native object of type TPtxGeomReal_QuadrilateralList.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_QuadrilateralList_New()

PDFTOOLBOX_EXPORT TPtxGeomReal_QuadrilateralList *PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_New ( void )

Create an empty list of TPtxGeomReal_Quadrilaterals

Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxGeomReal_QuadrilateralList_Remove()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Remove ( TPtxGeomReal_QuadrilateralList * pQuadrilateralList,
int iIndex )

Remove certain element from list.

Parameters
[in,out]pQuadrilateralListActs as a handle to the native object of type TPtxGeomReal_QuadrilateralList.
[in]iIndex
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxGeomReal_QuadrilateralList_Set()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxGeomReal_QuadrilateralList_Set ( TPtxGeomReal_QuadrilateralList * pQuadrilateralList,
int iIndex,
const TPtxGeomReal_Quadrilateral * pValue )

Update certain element in list.

Parameters
[in,out]pQuadrilateralListActs as a handle to the native object of type TPtxGeomReal_QuadrilateralList.
[in]iIndex
[in]pValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes: