Class PDGraphicsState
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.graphics.state.PDGraphicsState
-
-
Constructor Summary
Constructors Constructor Description PDGraphicsState(PDRectangle page)Constructor with a given page size to initialize the clipping path.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDGraphicsStateclone()doublegetAlphaConstant()Get the value of the stroke alpha constants property.BlendModegetBlendMode()Returns the current blend modeandroid.graphics.RegiongetCurrentClippingPath()This will get the current clipping path.MatrixgetCurrentTransformationMatrix()Get the value of the CTM.doublegetFlatness()get the value of the flatness property.android.graphics.Paint.CapgetLineCap()Get the value of the line cap.PDLineDashPatterngetLineDashPattern()This will get the current line dash pattern.android.graphics.Paint.JoingetLineJoin()Get the value of the line join.floatgetLineWidth()Get the value of the line width.floatgetMiterLimit()Get the value of the miter limit.doublegetNonStrokeAlphaConstant()Get the value of the non-stroke alpha constants property.PDColorgetNonStrokingColor()Returns the non-stroking color.PDColorSpacegetNonStrokingColorSpace()Returns the non-stroking color space.doublegetOverprintMode()get the value of the overprint mode property.RenderingIntentgetRenderingIntent()This will get the rendering intent.doublegetSmoothness()get the value of the smoothness property.PDSoftMaskgetSoftMask()returns the current softmaskPDColorgetStrokingColor()Returns the stroking color.PDColorSpacegetStrokingColorSpace()Returns the stroking color space.PDTextStategetTextState()This will get the graphics text state.voidintersectClippingPath(android.graphics.Path path)Modify the current clipping path by intersecting it with the given path.voidintersectClippingPath(android.graphics.Region area)Modify the current clipping path by intersecting it with the given path.booleanisAlphaSource()get the value of the stroke alpha source property.booleanisOverprint()/** get the value of the overprint property.booleanisStrokeAdjustment()Get the value of the stroke adjustment parameter.voidsetAlphaConstant(double value)set the value of the stroke alpha constants property.voidsetAlphaSource(boolean value)set the value of the alpha source property.voidsetBlendMode(BlendMode blendMode)Sets the blend mode in the current graphics statevoidsetCurrentTransformationMatrix(Matrix value)Set the value of the CTM.voidsetFlatness(double value)set the value of the flatness property.voidsetLineCap(android.graphics.Paint.Cap value)set the value of the line cap.voidsetLineDashPattern(PDLineDashPattern value)This will set the current line dash pattern.voidsetLineJoin(android.graphics.Paint.Join value)Get the value of the line join.voidsetLineWidth(float value)set the value of the line width.voidsetMiterLimit(float value)set the value of the miter limit.voidsetNonStrokeAlphaConstant(double value)set the value of the non-stroke alpha constants property.voidsetNonStrokingColor(PDColor color)Sets the non-stroking color.voidsetNonStrokingColorSpace(PDColorSpace colorSpace)Sets the the non-stroking color space.voidsetOverprint(boolean value)set the value of the overprint property.voidsetOverprintMode(double value)set the value of the overprint mode property.voidsetRenderingIntent(RenderingIntent value)This will set the rendering intent.voidsetSmoothness(double value)set the value of the smoothness property.voidsetSoftMask(PDSoftMask softMask)Sets the current soft maskvoidsetStrokeAdjustment(boolean value)set the value of the stroke adjustment.voidsetStrokingColor(PDColor color)Sets the stroking color.voidsetStrokingColorSpace(PDColorSpace colorSpace)Sets the the stroking color space.voidsetTextState(PDTextState value)This will set the graphics text state.
-
-
-
Constructor Detail
-
PDGraphicsState
public PDGraphicsState(PDRectangle page)
Constructor with a given page size to initialize the clipping path.- Parameters:
page- the size of the page
-
-
Method Detail
-
getCurrentTransformationMatrix
public Matrix getCurrentTransformationMatrix()
Get the value of the CTM.- Returns:
- The current transformation matrix.
-
setCurrentTransformationMatrix
public void setCurrentTransformationMatrix(Matrix value)
Set the value of the CTM.- Parameters:
value- The current transformation matrix.
-
getLineWidth
public float getLineWidth()
Get the value of the line width.- Returns:
- The current line width.
-
setLineWidth
public void setLineWidth(float value)
set the value of the line width.- Parameters:
value- The current line width.
-
getLineCap
public android.graphics.Paint.Cap getLineCap()
Get the value of the line cap.- Returns:
- The current line cap.
-
setLineCap
public void setLineCap(android.graphics.Paint.Cap value)
set the value of the line cap.- Parameters:
value- The current line cap.
-
getLineJoin
public android.graphics.Paint.Join getLineJoin()
Get the value of the line join.- Returns:
- The current line join value.
-
setLineJoin
public void setLineJoin(android.graphics.Paint.Join value)
Get the value of the line join.- Parameters:
value- The current line join
-
getMiterLimit
public float getMiterLimit()
Get the value of the miter limit.- Returns:
- The current miter limit.
-
setMiterLimit
public void setMiterLimit(float value)
set the value of the miter limit.- Parameters:
value- The current miter limit.
-
isStrokeAdjustment
public boolean isStrokeAdjustment()
Get the value of the stroke adjustment parameter.- Returns:
- The current stroke adjustment.
-
setStrokeAdjustment
public void setStrokeAdjustment(boolean value)
set the value of the stroke adjustment.- Parameters:
value- The value of the stroke adjustment parameter.
-
getAlphaConstant
public double getAlphaConstant()
Get the value of the stroke alpha constants property.- Returns:
- The value of the stroke alpha constants parameter.
-
setAlphaConstant
public void setAlphaConstant(double value)
set the value of the stroke alpha constants property.- Parameters:
value- The value of the stroke alpha constants parameter.
-
getNonStrokeAlphaConstant
public double getNonStrokeAlphaConstant()
Get the value of the non-stroke alpha constants property.- Returns:
- The value of the non-stroke alpha constants parameter.
-
setNonStrokeAlphaConstant
public void setNonStrokeAlphaConstant(double value)
set the value of the non-stroke alpha constants property.- Parameters:
value- The value of the non-stroke alpha constants parameter.
-
isAlphaSource
public boolean isAlphaSource()
get the value of the stroke alpha source property.- Returns:
- The value of the stroke alpha source parameter.
-
setAlphaSource
public void setAlphaSource(boolean value)
set the value of the alpha source property.- Parameters:
value- The value of the alpha source parameter.
-
getSoftMask
public PDSoftMask getSoftMask()
returns the current softmask- Returns:
- softMask
-
setSoftMask
public void setSoftMask(PDSoftMask softMask)
Sets the current soft mask- Parameters:
softMask-
-
getBlendMode
public BlendMode getBlendMode()
Returns the current blend mode- Returns:
- the current blend mode
-
setBlendMode
public void setBlendMode(BlendMode blendMode)
Sets the blend mode in the current graphics state- Parameters:
blendMode-
-
isOverprint
public boolean isOverprint()
/** get the value of the overprint property.- Returns:
- The value of the overprint parameter.
-
setOverprint
public void setOverprint(boolean value)
set the value of the overprint property.- Parameters:
value- The value of the overprint parameter.
-
getOverprintMode
public double getOverprintMode()
get the value of the overprint mode property.- Returns:
- The value of the overprint mode parameter.
-
setOverprintMode
public void setOverprintMode(double value)
set the value of the overprint mode property.- Parameters:
value- The value of the overprint mode parameter.
-
getFlatness
public double getFlatness()
get the value of the flatness property.- Returns:
- The value of the flatness parameter.
-
setFlatness
public void setFlatness(double value)
set the value of the flatness property.- Parameters:
value- The value of the flatness parameter.
-
getSmoothness
public double getSmoothness()
get the value of the smoothness property.- Returns:
- The value of the smoothness parameter.
-
setSmoothness
public void setSmoothness(double value)
set the value of the smoothness property.- Parameters:
value- The value of the smoothness parameter.
-
getTextState
public PDTextState getTextState()
This will get the graphics text state.- Returns:
- The graphics text state.
-
setTextState
public void setTextState(PDTextState value)
This will set the graphics text state.- Parameters:
value- The graphics text state.
-
getLineDashPattern
public PDLineDashPattern getLineDashPattern()
This will get the current line dash pattern.- Returns:
- The line dash pattern.
-
setLineDashPattern
public void setLineDashPattern(PDLineDashPattern value)
This will set the current line dash pattern.- Parameters:
value- The new line dash pattern.
-
getRenderingIntent
public RenderingIntent getRenderingIntent()
This will get the rendering intent.- Returns:
- The rendering intent
- See Also:
PDExtendedGraphicsState
-
setRenderingIntent
public void setRenderingIntent(RenderingIntent value)
This will set the rendering intent.- Parameters:
value- The new rendering intent.
-
clone
public PDGraphicsState clone()
-
getStrokingColor
public PDColor getStrokingColor()
Returns the stroking color.- Returns:
- stroking color
-
setStrokingColor
public void setStrokingColor(PDColor color)
Sets the stroking color.- Parameters:
color- The new stroking color
-
getNonStrokingColor
public PDColor getNonStrokingColor()
Returns the non-stroking color.- Returns:
- The non-stroking color
-
setNonStrokingColor
public void setNonStrokingColor(PDColor color)
Sets the non-stroking color.- Parameters:
color- The new non-stroking color
-
getStrokingColorSpace
public PDColorSpace getStrokingColorSpace()
Returns the stroking color space.- Returns:
- The stroking color space.
-
setStrokingColorSpace
public void setStrokingColorSpace(PDColorSpace colorSpace)
Sets the the stroking color space.- Parameters:
colorSpace- The new stroking color space.
-
getNonStrokingColorSpace
public PDColorSpace getNonStrokingColorSpace()
Returns the non-stroking color space.- Returns:
- The non-stroking color space.
-
setNonStrokingColorSpace
public void setNonStrokingColorSpace(PDColorSpace colorSpace)
Sets the the non-stroking color space.- Parameters:
colorSpace- The new non-stroking color space.
-
intersectClippingPath
public void intersectClippingPath(android.graphics.Path path)
Modify the current clipping path by intersecting it with the given path.- Parameters:
path- path to intersect with the clipping path
-
intersectClippingPath
public void intersectClippingPath(android.graphics.Region area)
Modify the current clipping path by intersecting it with the given path.- Parameters:
area- area to intersect with the clipping path
-
getCurrentClippingPath
public android.graphics.Region getCurrentClippingPath()
This will get the current clipping path. Do not modify this Area object!- Returns:
- The current clipping path.
-
-