public class TextState
extends java.lang.Object
TextState
class represents the text state used
in TextObject
class.TextObject
Modifier and Type | Field and Description |
---|---|
float |
charSpace
Character spacing.
|
Font |
font
Font object.
|
float |
fontSize
Font size.
|
float |
textLeading
Text leading.
|
Matrix |
textMatrix
Text transformation matrix
|
int |
textMode
Text mode.
|
static int |
TEXTMODE_CLIP
Text mode: Add text to path for clipping.
|
static int |
TEXTMODE_FILL
Text mode: Fill text.
|
static int |
TEXTMODE_FILLCLIP
Text mode: Fill text and add to path for clipping.
|
static int |
TEXTMODE_FILLSTROKE
Text mode: Fill and stroke text.
|
static int |
TEXTMODE_FILLSTROKECLIP
Text mode: Fill, then stroke text and add to path for clipping.
|
static int |
TEXTMODE_INVISIBLE
Text mode: Neither fill nor stroke text (invisible).
|
static int |
TEXTMODE_STROKE
Text mode: Stroke text.
|
static int |
TEXTMODE_STROKECLIP
Text mode: Stroke text and add to path for clipping.
|
float |
wordSpace
Word spacing.
|
float |
x
X-coordinate of origin in PDF "user space".
|
float |
y
Y-coordinate of origin in PDF "user space".
|
Constructor and Description |
---|
TextState() |
public static final int TEXTMODE_FILL
public static final int TEXTMODE_STROKE
public static final int TEXTMODE_FILLSTROKE
public static final int TEXTMODE_INVISIBLE
public static final int TEXTMODE_FILLCLIP
public static final int TEXTMODE_STROKECLIP
public static final int TEXTMODE_FILLSTROKECLIP
public static final int TEXTMODE_CLIP
public Font font
public float fontSize
public float charSpace
For horizontal writing, a positive value has the effect of expanding the distance between glyphs, whereas for vertical writing, a negative value has this effect.
public float wordSpace
For horizontal writing, a positive value has the effect of increasing the spacing between words. For vertical writing, a positive value decreases the spacing between words (and a negative value increases it), since vertical coordinates increase from bottom to top.
Note: It will not take effect if the font
is embedded font.
public int textMode
Please refer to constant definitions
and
this should be one of these macros.
TextState.TEXTMODE_XXX
Note: After calling function
,
if textMode value is larger than 3, (textMode - 4) will be used instead.PageObjects.generateContents()
public float x
public float y
public Matrix textMatrix
public float textLeading