public class PathObject extends PageObject
PathObject
represents a PDF PathObject in Page.
The PathObject
class offers methods to do some operations on path object.
It can be constructed by the following way:
Example:
PathObject pathObj = PathObject.create(page);
Modifier and Type | Field and Description |
---|---|
static int |
FILLMODE_ALTERNATE
Alternate fill mode.
|
static int |
FILLMODE_NONE
No fill mode.
|
static int |
FILLMODE_WINDING
Winding fill mode.
|
TYPE_ALL, TYPE_FORMXOBJECT, TYPE_IMAGE, TYPE_PATH, TYPE_SHADING, TYPE_TEXT
Modifier and Type | Method and Description |
---|---|
static PathObject |
create(PDFPage page)
Create a path object.
|
int |
getType()
Get type of a page object.
|
void |
setFillMode(int fillMode)
Set fill mode of current path object.
|
void |
setPathData(PDFPath path)
Set path data of current path object.
|
void |
setStrokeState(boolean isStroke)
Set stroke state of current path object.
|
getFillColor, getHandle, getMarkedContent, getRect, getStrokeColor, release, setFillColor, setMatrix, setStrokeColor
public static final int FILLMODE_NONE
public static final int FILLMODE_ALTERNATE
Represent a fill mode in which the system fills this area between odd-numbered and even-numbered polygon sides on each scan line.
public static final int FILLMODE_WINDING
Represent a fill mode in which the system uses a direction in which a figure is drawn to determine whether to fill an area.
public int getType()
PageObject
getType
in class PageObject
public static PathObject create(PDFPage page) throws PDFException
page
- A PDFPage
object which is a PDF page. It should
be valid.PathObject
object that receives the
path object newly created.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
PDFPage
public void setPathData(PDFPath path) throws PDFException
path
- A PDFPath
object to be set.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
PDFPath
public void setFillMode(int fillMode) throws PDFException
fillMode
- Please refer to constant definitions
FILLMODE_XXX
and this
should be one of these constants.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void setStrokeState(boolean isStroke) throws PDFException
isStroke
- A boolean
value that specifies where to stroke current path object.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException