|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.pdf.PDFGraphicsState
public class PDFGraphicsState
Represents a PDF Graphics State object. The Graphics State is ordinarily used by PDF viewer applications. Our application is instead a PDF writing application. However keeping track of the Graphics State is useful because it allows us to avoid writing operators that change the Graphics State unnecessarily.
Field Summary | |
---|---|
static float |
INITIAL_HORIZONTAL_SCALING
Constant for the initial horizontal scaling percentage, that is 100%. |
Constructor Summary | |
---|---|
PDFGraphicsState()
Create a PDFGraphicsState instance. |
|
PDFGraphicsState(PDFGraphicsState existingState)
Creates a new PDFGraphicsState instance, initilializing its values to those of an existing instance. |
Method Summary | |
---|---|
Color |
getFillColor()
Returns the "non-stroke" or "other" color. |
org.axsl.pdf.PdfFont |
getFont()
Returns the font. |
float |
getFontSize()
Return the font-size. |
Color |
getStrokeColor()
Returns the "stroke" color. |
void |
reset()
Resets the Graphics State to its original state, as documented in PDF Reference, 3rd Edition, Section 4.3. |
boolean |
setCharacterSpacing(float newCharacterSpacing)
Sets the character spacing. |
boolean |
setFillColor(Color newFillColor)
Sets the "non-stroke" or "other" color (Graphics State holds two colors, one for stroke operations and one for all other operations). |
boolean |
setFont(org.axsl.pdf.PdfFont newFont)
Sets the font. |
boolean |
setFontSize(float newFontSize)
Sets the font-size. |
boolean |
setHorizontalScaling(float newHorizontalScaling)
Sets the horizontal scaling. |
boolean |
setLeading(float newLeading)
Sets the text leading. |
boolean |
setLineCapStyle(org.axsl.pdf.PdfLineCapStyle newLineCapStyle)
Sets the line cap style. |
boolean |
setLineDashPattern(float[] newDashArray,
float newDashPhase)
Sets the line dash pattern. |
boolean |
setStrokeColor(Color newStrokeColor)
Sets the stroke color (Graphics State holds two colors, one for stroke operations and one for all other operations). |
boolean |
setTextKnockout(boolean newTextKnockout)
Sets the text knockout flag. |
boolean |
setTextRenderingMode(org.axsl.pdf.PdfTextRenderingMode newTextRenderingMode)
Sets the text rendering mode. |
boolean |
setTextRise(float newTextRise)
Sets the text rise. |
boolean |
setWordSpacing(float newWordSpacing)
Sets the word spacing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float INITIAL_HORIZONTAL_SCALING
Constructor Detail |
---|
public PDFGraphicsState()
public PDFGraphicsState(PDFGraphicsState existingState)
existingState
- The instance whose values should be copied into the
new instance.Method Detail |
---|
public void reset()
public boolean setStrokeColor(Color newStrokeColor)
newStrokeColor
- The color that stroke operations should now use.
public Color getStrokeColor()
public boolean setFillColor(Color newFillColor)
newFillColor
- The color that non-stroke operations should now use.
public Color getFillColor()
public boolean setCharacterSpacing(float newCharacterSpacing)
newCharacterSpacing
- The new character spacing, in points.
public boolean setWordSpacing(float newWordSpacing)
newWordSpacing
- The new word spacing, in points.
public boolean setFont(org.axsl.pdf.PdfFont newFont)
newFont
- The new font.
public org.axsl.pdf.PdfFont getFont()
public boolean setFontSize(float newFontSize)
newFontSize
- The new font-size, in points.
public float getFontSize()
public boolean setLineDashPattern(float[] newDashArray, float newDashPhase)
newDashArray
- The new dash array.newDashPhase
- The new dash phase.
public boolean setLineCapStyle(org.axsl.pdf.PdfLineCapStyle newLineCapStyle)
newLineCapStyle
- The new line cap style.
public boolean setHorizontalScaling(float newHorizontalScaling)
newHorizontalScaling
- The new horizontal scaling percentage.
public boolean setLeading(float newLeading)
newLeading
- The new leading value.
public boolean setTextRenderingMode(org.axsl.pdf.PdfTextRenderingMode newTextRenderingMode)
newTextRenderingMode
- The new text rendering mode.
public boolean setTextRise(float newTextRise)
newTextRise
- The new text rise value.
public boolean setTextKnockout(boolean newTextKnockout)
newTextKnockout
- The new text rise value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |