Index

C/C++ Functions

txTextSetTransformPlus

void txTextSetTransformPlus(DT_TXDOC text_doc, const DT_TM3X3 transform)

Short Description: Set text document's transform - 3x3 transformation matrix

txTextSetTransform

void txTextSetTransform(DT_TXDOC text_doc, const DT_TM2X2 transform)

Short Description: Set text document's transform - 2x2 transformation matrix

txTextSetScale

void txTextSetScale(DT_TXDOC text_doc, DT_FLOAT scale)

Short Description: Set text document's transform - simple scale

The txTextSetTransformPlus (or txTextSetTransform or txTextSetScale) function sets the text document's transformation matrix.

This matrix is respected when the text document is drawn by calling the txTextDraw function. This allows applications to easily scale, stretch, rotate, skew or transform using an arbitrary transform matrix the entire output of this function.

The only difference between txTextSetTransformPlus and txTextSetTransform is that txTextSetTransformPlus uses a 3x3 transformation matrix while txTextSetTransform uses a 2x2 transformation matrix. Therefore, txTextSetTransform is more limited (i.e. this function cannot be used to apply a perspective transform to a text document). Finally, the txTextSetScale function is even more limited — it is a special case of txTextSetTransform.

txTextSetTransformPlus is a convenience function. It has the same effect as the following code:

DT_PDDOC power_doc; txTextGetPowerDoc(text_doc, &power_doc);
pdDocSetTransformPlus(power_doc, transform);

txTextSetTransform is a convenience function. It has the same effect as the following code:

DT_PDDOC power_doc; txTextGetPowerDoc(text_doc, &power_doc);
pdDocSetTransform(power_doc, transform);

txTextSetScale is a convenience function. It has the same effect as the following code:

DT_PDDOC power_doc; txTextGetPowerDoc(text_doc, &power_doc);
pdDocSetScale(power_doc, scale);

Parameters

ParameterDescription

text_doc

Handle of the associated text document instance.

transform

For txTextSetTransformPlus, this is a 3x3 transformation matrix. This matrix represents a 2D perspective (or projective) transform to apply to the specified text document. For more information, see the description of the DT_TM3X3 basic data type in this manual.

For txTextSetTransform, this is a 2x2 transformation matrix. This matrix represents the top two rows and columns of a 2D perspective transform to apply to the specified text document. For more information, see the description of the DT_TM2X2 basic data type in this manual.

scale

For txTextSetScale only, a simple scale to apply to the specified text document. Same as calling txTextSetTransform with the following:
transform[0][0] = scale, transform[0][1] = 0.0, transform[1][0] = 0.0 and transform[1][1] = scale.

Related Functions

txTextDraw
txTextGetTransformPlus, txTextGetTransform

 

Index