kPDETextRun = 0x0001 | Text run.
|
kPDETextChar = 0x0002 | Character (text run with only one character).
|
kPDETextPageSpace = 0x0004 | Obtain the advance width in page space.
|
kPDETextGetBounds = 0x0008 | Fill in the left and right bounds of the text run's bounding box.
|
kPDETextPreciseQuad = 0x0010 |
kPDETextFill | Fill text.
|
kPDETextStroke | Stroke text.
|
kPDETextFillAndStroke | Fill and stroke text.
|
kPDETextInvisible | Text with no fill and no stroke (invisible).
|
kPDECharSpacingWasSet = 0x0001 | Character spacing was set corresponding to the Tc operator.
|
kPDEWordSpacingWasSet = 0x0002 | Word spacing was set corresponding to the Tw operator.
|
kPDERenderModeWasSet = 0x0004 | Text rendering mode was set corresponding to the Tr operator.
|
kPDEFontSizeWasSet = 0x0008 | Font size was set corresponding to the Tf operator.
|
kPDEHScaleWasSet = 0x0010 | Horizontal Scaling was set corresponding to the Tz operator.
|
kPDETextRiseWasSet = 0x0020 | Text rise was set corresponding to the Ts operator.
|
charpath
of a PDEText can be used to represent a clip. typedef
struct
_t_PDEText
*
PDEText
;
typedef
struct
_t_PDETextItem
*
PDETextItem
;
| |
PDETextStateWasSetFlags indicates whether an attribute has been set.
| |
Character spacing was set corresponding to the Tc operator.
| |
Word spacing corresponding to the Tw operator.
| |
Text rendering mode corresponding to the Tr operator.
| |
Default is
1 . | |
Default is
100 (meaning 100%). | |
Specifies the distance, in text space units that are not scaled, to move the baseline up or down from its default location. See the description of Text Rise in the ISO 32000-1:2008, Document Management- Portable Document Format-Part 1: PDF 1.7, section 9.3.7, page 247.
| |
|
Note: This method does not change the reference count of pdeText
; however, the reference count of the objects in the gstateP
parameter are incremented.
void
PDETextAdd(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
IN
ASUns8
*
text
,
IN
ASInt32
textLen
,
IN
PDEFont
font
,
IN
PDEGraphicStateP
gstateP
,
IN
ASUns32
gstateLen
,
IN
PDETextStateP
tstateP
,
IN
ASUns32
tstateLen
,
IN
ASFixedMatrixP
textMatrixP
,
IN
ASFixedMatrixP
strokeMatrixP
);
pdeText | The text object to which a character or text run is added.
| ||||||
flags | A PDETextFlags that specifies what kind of text to add. It must be one of the following values:
| ||||||
index | The index after which to add the character or text run.
| ||||||
text | |||||||
textLen | The length of the text in bytes.
| ||||||
font | The font for the element.
| ||||||
gstateP | A pointer to a PDEGraphicStateP structure with the graphics state for the element.
| ||||||
gstateLen | The length of the graphics state for the element.
| ||||||
tstateP | A pointer to a PDETextState structure with the text state for the element. Note that PDFEdit ignores the
wasSetFlags flag of the PDETextState structure, so you must initialize the PDETextState fields. | ||||||
tstateLen | The length of the text state for the element.
| ||||||
textMatrixP | A pointer to an ASFixedMatrix that holds the matrix for the element.
| ||||||
strokeMatrixP | A pointer to an ASFixedMatrix that holds the matrix for the line width when stroking text. It may be
NULL . Note that this field is not currently used. |
Note: This method does not change the reference count of pdeText
; however, the reference count of the objects in the gstateP
parameter are incremented.
void
PDETextAddEx(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
IN
ASUns8
*
text
,
IN
ASInt32
textLen
,
IN
PDEFont
font
,
IN
PDEGraphicStateP
gstateP
,
IN
ASUns32
gstateLen
,
IN
PDETextStateP
tstateP
,
IN
ASUns32
tstateLen
,
IN
ASDoubleMatrixP
textMatrixP
,
IN
ASDoubleMatrixP
strokeMatrixP
);
pdeText | The text object to which a character or text run is added.
| ||||||
flags | A PDETextFlags that specifies what kind of text to add. It must be one of the following values:
| ||||||
index | The index after which to add the character or text run.
| ||||||
text | |||||||
textLen | The length of the text in bytes.
| ||||||
font | The font for the element.
| ||||||
gstateP | A pointer to a PDEGraphicStateP structure with the graphics state for the element.
| ||||||
gstateLen | The length of the graphics state for the element.
| ||||||
tstateP | A pointer to a PDETextState structure with the text state for the element. Note that PDFEdit ignores the
wasSetFlags flag of the PDETextState structure, so you must initialize the PDETextState fields. | ||||||
tstateLen | The length of the text state for the element.
| ||||||
textMatrixP | A pointer to an ASDoubleMatrix that holds the matrix for the element.
| ||||||
strokeMatrixP | A pointer to an ASDoubleMatrix that holds the matrix for the line width when stroking text. It may be
NULL . Note that this field is currently not used. |
Note: This method does not change the reference count of pdeText
; however, the reference count of the objects in the gstateP
parameter are incremented.
void
PDETextAddGlyphs(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
IN
PDEGlyphRunP
glyphRun
,
IN
PDEFont
font
,
IN
PDEGraphicStateP
gstateP
,
IN
ASUns32
gstateLen
,
IN
PDETextStateP
tstateP
,
IN
ASUns32
tstateLen
,
IN
ASFixedMatrixP
textMatrixP
,
IN
ASFixedMatrixP
strokeMatrixP
);
pdeText | The text object to which a character or text run is added.
| ||||||
flags | A PDETextFlags that specifies what kind of text to add. It must be one of the following values:
| ||||||
index | The index after which to add the character or text run.
| ||||||
glyphRun | A pointer to a PDEGlyphRun structure with Unicode data, GlyphIDs and their correspondence.
| ||||||
font | The font for the element.
| ||||||
gstateP | A pointer to a PDEGraphicStateP structure with the graphics state for the element.
| ||||||
gstateLen | The length of the graphics state for the element.
| ||||||
tstateP | A pointer to a PDETextState structure with text state for the element. Note that PDFEdit ignores the
wasSetFlags flag of the PDETextState structure, so you must initialize the PDETextState fields. | ||||||
tstateLen | The length of the text state for the element.
| ||||||
textMatrixP | A pointer to an ASFixedMatrix that holds the matrix for the element.
| ||||||
strokeMatrixP | A pointer to an ASFixedMatrix that holds the matrix for the line width when stroking text. It may be
NULL . Note that, currently, this field is not used. |
Note: This method does not change the reference count of pdeText
; however, the reference count of the objects in the gstateP
parameter are incremented.
void
PDETextAddGlyphsEx(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
IN
PDEGlyphRunP
glyphRun
,
IN
PDEFont
font
,
IN
PDEGraphicStateP
gstateP
,
IN
ASUns32
gstateLen
,
IN
PDETextStateP
tstateP
,
IN
ASUns32
tstateLen
,
IN
ASDoubleMatrixP
textMatrixP
,
IN
ASDoubleMatrixP
strokeMatrixP
);
pdeText | The text object to which a character or text run is added.
| ||||||
flags | A PDETextFlags that specifies what kind of text to add. It must be one of the following values:
| ||||||
index | The index after which to add the character or text run.
| ||||||
glyphRun | A pointer to a PDEGlyphRun structure with Unicode data, GlyphIDs and their correspondence.
| ||||||
font | The font for the element.
| ||||||
gstateP | A pointer to a PDEGraphicStateP structure with the graphics state for the element.
| ||||||
gstateLen | The length of the graphics state for the element.
| ||||||
tstateP | A pointer to a PDETextState structure with text state for the element. Note that PDFEdit ignores the
wasSetFlags flag of the PDETextState structure, so you must initialize the PDETextState fields. | ||||||
tstateLen | The length of the text state for the element.
| ||||||
textMatrixP | A pointer to an ASDoubleMatrix that holds the matrix for the element.
| ||||||
strokeMatrixP | A pointer to an ASDoubleMatrix that holds the matrix for the line width when stroking text. It may be
NULL . Note that this field is currently not used. |
void
PDETextAddItem(
IN
PDEText
text
,
IN
ASInt32
addIndex
,
IN
PDETextItem
textItem
);
text | The text object to which the text item is added.
|
addIndex | The index of the text item in
pdeText . |
textItem | The text item to add.
|
Creates an empty text object.
Call PDERelease() to dispose of the returned text object when finished with it.
PDEText
PDETextCreate(
void
);
Gets the advance width of a character or a text element. Advance width is returned in either character space or user space. The advance width is the amount by which the current point advances when the character is drawn.
Advance width may be horizontal or vertical, depending on the writing style. Thus advanceP
has both a horizontal and vertical component.
void
PDETextGetAdvance(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar, kPDETextPageSpace */
IN
ASInt32
index
,
OUT
ASFixedPointP
advanceP
);
pdeText | A text object containing a character or text run whose advance width is found.
| ||||||
flags | A PDETextFlags value that specifies whether index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
In addition, set the kPDETextPageSpace flag to obtain the advance width in user space. If it is not set, the advance width is in character space. If this flag is not set, this method returns a value that is independent of any sizes, matrices, or scaling, simply adding up the font's raw glyph widths, supplemented only by unscaled character and word spacing. | ||||||
index | The index of the character or text run in
pdeText . | ||||||
advanceP | (Filled by the method) A pointer to a ASFixedPoint value indicating the advance width.
|
Gets the advance width of a character or a text element. Advance width is returned in either character space or user space. The advance width is the amount by which the current point advances when the character is drawn.
Advance width may be horizontal or vertical, depending on the writing style. Thus advanceP
has both a horizontal and vertical component.
void
PDETextGetAdvanceWidth(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar, kPDETextPageSpace */
IN
ASInt32
index
,
OUT
ASFixedPointP
advanceP
);
pdeText | A text object containing a character or text run whose advance width is found.
| ||||||
flags | A PDETextFlags value that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
In addition, set the kPDETextPageSpace flag to obtain the advance width in user space. If it is not set, the advance width is in character space. If this flag is not set, this method returns a value that is independent of any sizes, matrices, or scaling, simply adding up the font's raw glyph widths, supplemented only by unscaled character and word spacing. | ||||||
index | The index of the character or text run in
pdeText . | ||||||
advanceP | (Filled by the method) A pointer to a ASFixedPoint value indicating the advance width.
|
void
PDETextGetBBox(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
ASFixedRectP
bboxP
);
pdeText | IN/OUT A text object containing a character or text run whose bounding box is found.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
bboxP | IN/OUT (Filled by the method) A pointer to ASFixedRect to set to the bounding box of specified character or text run.
|
Note: This method does not change the reference count of the returned PDEFont.
PDEFont
PDETextGetFont(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
);
pdeText | IN/OUT A text object containing a character or text run whose font is found.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . |
Note: This method does not increment the reference count of the objects in stateP
.
void
PDETextGetGState(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
PDEGraphicStateP
stateP
,
IN
ASUns32
stateSize
);
pdeText | A text object containing a character or text run whose graphics state is found.
| ||||||
flags | A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | The index of the character or text run in
pdeText . | ||||||
stateP | (Filled by the method) A pointer to a PDEGraphicState structure with the graphics state of the specified character or text run.
| ||||||
stateSize | The size of the
stateP buffer in bytes. |
Note: This method does not increment the reference count of the objects in stateP
.
void
PDETextGetGStateEx(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
PDEGraphicStateExP
stateP
,
IN
ASUns32
stateSize
);
pdeText | A text object containing a character or text run whose graphics state is found.
| ||||||
flags | A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | The index of the character or text run in
pdeText . | ||||||
stateP | (Filled by the method) A pointer to a PDEGraphicStateExP structure with the graphics state of the specified character or text run.
| ||||||
stateSize | The size of the
stateP buffer in bytes. |
PDETextItem
PDETextGetItem(
IN
PDEText
text
,
IN
ASUns32
index
);
text | Text object from which the text item is obtained.
|
index | The index of the text item in
pdeText . |
fontSize
, hScale
, and textRise
in the textState
into account. void
PDETextGetMatrix(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
ASFixedMatrixP
matrixP
);
pdeText | IN/OUT A text object containing a character or text run whose graphics state is found.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
matrixP | IN/OUT (Filled by the method) An ASFixedMatrixP that holds the matrix of the specified character or text run.
|
fontSize
, hScale
, and textRise
in the textState
into account. void
PDETextGetMatrixEx(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
ASDoubleMatrixP
matrixP
);
pdeText | IN/OUT A text object containing a character or text run whose graphics state is found.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
matrixP | IN/OUT (Filled by the method) An ASDoubleMatrixP that holds the matrix of the specified character or text run.
|
ASInt32
PDETextGetNumBytes(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun or kPDETextChar */
IN
ASInt32
index
);
pdeText | IN/OUT A PDEText object returned from one of the
PDETextCreate methods whose text is examined. | ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . |
ASInt32
PDETextGetNumChars(
IN
PDEText
pdeText
);
pdeText | IN/OUT A text object whose number of characters is found.
|
pdeText
. ASInt32
PDETextGetNumRuns(
IN
PDEText
pdeText
);
pdeText | IN/OUT A text object whose number of text runs is found.
|
pdeText
. Gets the quad bounding the specified text run or character.
The advance portion of the quad is based on the left side bearing and advance width.
void
PDETextGetQuad(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar, kPDETextBounding */
IN
ASInt32
index
,
OUT
ASFixedQuadP
quadP
);
pdeText | IN/OUT A text object containing a character or text run whose quad is found.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
In addition, if the kPDETextBounding flag is set, PDETextGetQuad() uses the font descriptor's | ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
quadP | IN/OUT (Filled by the method) A pointer to ASFixedQuad that bounds the specified character or text run.
|
ASInt32
PDETextGetRunForChar(
IN
PDEText
pdeText
,
IN
ASInt32
charIndex
);
pdeText | IN/OUT A text object to examine.
|
charIndex | IN/OUT The number of the character to find in
pdeText . |
pdeText
. void
PDETextGetState(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
PDETextStateP
stateP
,
IN
ASUns32
stateSize
);
pdeText | IN/OUT A text object containing a character or text run whose text state is found.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
stateP | IN/OUT (Filled by the method) A pointer to a PDETextState structure to fill with the text state of the specified character or text run.
| ||||||
stateSize | IN/OUT The size of the
stateP buffer in bytes. |
Note: This method returns no valid information.
void
PDETextGetStrokeMatrix(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
ASFixedMatrixP
matrixP
);
pdeText | A text object containing a character or text run whose stroke matrix is found.
| ||||||
flags | A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | The index of the character or text run in
pdeText . | ||||||
matrixP | (Filled by the method) A pointer to ASFixedMatrix that holds the stroke matrix of the specified character or text run. This matrix is the transformation for line widths when stroking. The
h and v values of the matrix are ignored. |
Note: This method returns no valid information.
void
PDETextGetStrokeMatrixEx(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
ASDoubleMatrixP
matrixP
);
pdeText | A text object containing a character or text run whose stroke matrix is found.
| ||||||
flags | A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | The index of the character or text run in
pdeText . | ||||||
matrixP | (Filled by the method) A pointer to ASDoubleMatrix that holds the stroke matrix of the specified character or text run. This matrix is the transformation for line widths when stroking. The
h and v values of the matrix are ignored. |
ASInt32
PDETextGetText(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
ASUns8
*
textBuffer
);
pdeText | IN/OUT A text object containing a character or text run whose text is found.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
textBuffer | IN/OUT (Filled by the method) The text of the specified character or text run.
textBuffer must be large enough to hold the returned text. If textBuffer is NULL , it returns the number of bytes required to hold the data. |
void
PDETextGetTextMatrix(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
ASFixedMatrixP
matrixP
);
pdeText | A text object containing a character or text run whose matrix is found.
| ||||||
flags | A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | The index of the character or text run in
pdeText . | ||||||
matrixP | (Filled by the method) A pointer to ASFixedMatrix that holds the matrix of the specified character or text run. This is the transformation matrix from user space to the current text space. The
h and v values of the matrix indicate the origin of the first character. |
void
PDETextGetTextMatrixEx(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
ASDoubleMatrixP
matrixP
);
pdeText | A text object containing a character or text run whose matrix is found.
| ||||||
flags | A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | The index of the character or text run in
pdeText . | ||||||
matrixP | (Filled by the method) A pointer to ASDoubleMatrix that holds the matrix of the specified character or text run. This is the transformation matrix from user space to the current text space. The
h and v values of the matrix indicate the origin of the first character. |
Note: This function handles only charSpacing
, wordSpacing
, and renderMode
for backward compatibility. For all attributes, use PDETextGetState() instead.
void
PDETextGetTextState(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
OUT
PDETextStateP
stateP
,
IN
ASUns32
stateSize
);
pdeText | IN/OUT A text object containing a character or text run whose text state is found.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
stateP | IN/OUT (Filled by the method) A pointer to a PDETextState structure to fill with the text state of the specified character or text run.
| ||||||
stateSize | IN/OUT The size of the
stateP buffer in bytes. |
ASBool
PDETextIsAtPoint(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
IN
ASFixedPoint
point
);
pdeText | IN/OUT The text to test.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
point | IN/OUT The point, specified in user space coordinates.
|
ASBool
PDETextIsAtRect(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
IN
ASFixedRect
rect
);
pdeText | IN/OUT The text to test.
| ||||||
flags | IN/OUT A PDETextFlags flag that specifies whether index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
rect | IN/OUT The rectangle, specified in user space coordinates.
|
Note: This method decrements the reference count of objects associated with the pdeText
in the graphic state and font.
void
PDETextRemove(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
IN
ASInt32
count
);
pdeText | IN/OUT The text object from which text is removed.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
count | IN/OUT The number of characters or text runs to remove.
|
void
PDETextRemoveItems(
IN
PDEText
text
,
IN
ASUns32
index
,
IN
ASUns32
count
);
text | The text object from which the text items are removed.
|
index | The index of the first text item in
pdeText to remove. |
count | The number of text items to remove.
|
Replaces characters in a text object.
This method does not change the number of characters in the text object; extra characters are ignored.
void
PDETextReplaceChars(
IN
PDEText
pdeText
,
IN
ASUns32
flags
,
/* kPDETextRun, kPDETextChar */
IN
ASInt32
index
,
IN
ASUns8
*
textBuffer
,
IN
ASInt32
numChars
);
pdeText | IN/OUT The text object in which characters are replaced.
| ||||||
flags | IN/OUT A PDETextFlags that specifies whether
index refers to the character offset from the beginning of the text object or the index of the text run in the text object. It must be one of the following values:
| ||||||
index | IN/OUT The index of the character or text run in
pdeText . | ||||||
textBuffer | IN/OUT Replacement text.
| ||||||
numChars | IN/OUT The number of bytes to replace.
|
ASInt32
PDETextRunGetCharOffset(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
);
pdeText | IN/OUT A text object containing a character or text run whose graphics state is found.
|
runIndex | IN/OUT The index of the text run whose first character's index is returned.
|
pdeText
. ASInt32
PDETextRunGetNumChars(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
);
pdeText | IN/OUT A text object containing a text run whose number of characters is found.
|
runIndex | IN/OUT The index of the text run whose number of characters is returned.
|
Note: This method decrements the reference count of the previous font and increments the reference count of the new font.
void
PDETextRunSetFont(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
PDEFont
font
);
pdeText | IN/OUT The text object containing a text run whose font is set.
|
runIndex | IN/OUT The index of the text run.
|
font | IN/OUT The font set for the text run.
|
Note: This method increments the reference count of objects in stateP
.
void
PDETextRunSetGState(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
PDEGraphicStateP
stateP
,
IN
ASUns32
stateSize
);
pdeText | The text object containing a text run whose graphics state is set.
|
runIndex | The index of the text run.
|
stateP | A pointer to a PDEGraphicState structure with the graphics state to set.
|
stateSize | The size of the
stateP buffer in bytes. |
Note: This method increments the reference count of objects in stateP
.
void
PDETextRunSetGStateEx(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
PDEGraphicStateExP
stateP
,
IN
ASUns32
stateSize
);
pdeText | The text object containing a text run whose graphics state is set.
|
runIndex | The index of the text run.
|
stateP | A pointer to a PDEGraphicStateEx structure with the graphics state to set.
|
stateSize | The size of the
stateP buffer in bytes. |
fontSize
, hScale
, and textRise
in the textState
of PDEText. void
PDETextRunSetMatrix(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
ASFixedMatrixP
matrixP
);
pdeText | IN/OUT The text object containing a text run.
|
runIndex | IN/OUT The index of the text run.
|
matrixP | IN/OUT ASFixedMatrixP pointer.
|
fontSize
, hScale
, and textRise
in the textState
of PDEText. void
PDETextRunSetMatrixEx(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
ASDoubleMatrixP
matrixP
);
pdeText | IN/OUT The text object containing a text run.
|
runIndex | IN/OUT The index of the text run.
|
matrixP | IN/OUT ASDoubleMatrixP pointer.
|
void
PDETextRunSetState(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
PDETextStateP
stateP
,
IN
ASUns32
stateSize
);
pdeText | The text object containing a text run whose state is set.
|
runIndex | The index of the text run.
|
stateP | A pointer to a PDETextState structure with the state to set.
|
stateSize | The size of the
stateP buffer in bytes. |
Note: Currently this method is not implemented.
void
PDETextRunSetStrokeMatrix(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
ASFixedMatrixP
matrixP
);
pdeText | The text object containing a text run whose stroke matrix is set.
|
runIndex | The index of the text run.
|
matrixP | A pointer to an ASFixedMatrix that holds the stroke matrix.
|
Note: Currently this method is not implemented (Acrobat 10 and later).
void
PDETextRunSetStrokeMatrixEx(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
ASDoubleMatrixP
matrixP
);
pdeText | The text object containing a text run whose stroke matrix is set.
|
runIndex | The index of the text run.
|
matrixP | A pointer to an ASDoubleMatrix that holds the stroke matrix.
|
void
PDETextRunSetTextMatrix(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
ASFixedMatrixP
matrixP
);
pdeText | IN/OUT The text object containing a text run whose text matrix is set.
|
runIndex | IN/OUT The index of the text run.
|
matrixP | IN/OUT A pointer to an ASFixedMatrix that holds the text matrix.
|
void
PDETextRunSetTextMatrixEx(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
ASDoubleMatrixP
matrixP
);
pdeText | IN/OUT The text object containing a text run whose text matrix is set.
|
runIndex | IN/OUT The index of the text run.
|
matrixP | IN/OUT A pointer to an ASDoubleMatrix that holds the text matrix.
|
Note: This method has the following side effect: It modifies the text matrix of the run. In order to maintain backward compatibility, this method only directly operates on the first four fields of PDETextState. When it is called, it calculates a new text matrix with three additional fields: fontSize
, hScale
, and textRise
(see PDETextState). To avoid this behavior, use PDETextRunSetState() instead (which was added to address this problem).
void
PDETextRunSetTextState(
IN
PDEText
pdeText
,
IN
ASInt32
runIndex
,
IN
PDETextStateP
stateP
,
IN
ASUns32
stateSize
);
pdeText | The text object containing a text run whose text state is set.
|
runIndex | The index of the text run.
|
stateP | A pointer to a PDETextState structure with text state.
|
stateSize | The size of the
stateP buffer in bytes. |
void
PDETextSplitRunAt(
IN
PDEText
pdeText
,
IN
ASInt32
splitLoc
);
pdeText | The text object containing a text run to split.
|
splitLoc | The split location, relative to the text object. The first text run is from character index
0 up to splitLoc . The second text run is from splitLoc + 1 to the end of the run. |