PdfPagePathObject | API reference | Android Developers
public
final
class
PdfPagePathObject
extends PdfPageObject
Represents a path object on a PDF page. This class extends
PdfPageObject and provides methods to access and modify the
path's content, such as its shape, fill color, stroke color and line width.
Summary
Constants | |
|---|---|
int |
RENDER_MODE_FILL
Fill Mode : Only the interior of the glyphs is filled with the fill color. |
int |
RENDER_MODE_FILL_STROKE
FillStroke Mode : Both the interior and outline of the glyphs are rendered using the fill abd stroke colors respectively. |
int |
RENDER_MODE_STROKE
Stroke Mode : Only the outline of the glyphs is stroked with the stroke color. |
int |
RENDER_MODE_UNKNOWN
Unknown Render Mode. |
Public constructors | |
|---|---|
PdfPagePathObject(Path path)
Constructor for the PdfPagePathObject. |
|
Public methods | |
|---|---|
int
|
getFillColor()
Returns the fill color of the object. |
int
|
getRenderMode()
Returns the |
int
|
getStrokeColor()
Returns the stroke color of the object. |
float
|
getStrokeWidth()
Returns the stroke width of the object. |
void
|
setFillColor(int fillColor)
Sets the fill color of the object. |
void
|
setRenderMode(int renderMode)
Sets the |
void
|
setStrokeColor(int strokeColor)
Sets the stroke color of the object. |
void
|
setStrokeWidth(float strokeWidth)
Sets the stroke width of the object. |
Path
|
toPath()
Returns the path of the object. |
Inherited methods | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
| |||||||||||||||||||||||
|
From class
| |||||||||||||||||||||||
Constants
RENDER_MODE_FILL
public static final int RENDER_MODE_FILL
Fill Mode : Only the interior of the glyphs is filled with the fill color.
Constant Value: 0 (0x00000000)
RENDER_MODE_FILL_STROKE
public static final int RENDER_MODE_FILL_STROKE
FillStroke Mode : Both the interior and outline of the glyphs are rendered using the fill abd stroke colors respectively.
Constant Value: 2 (0x00000002)
RENDER_MODE_STROKE
public static final int RENDER_MODE_STROKE
Stroke Mode : Only the outline of the glyphs is stroked with the stroke color.
Constant Value: 1 (0x00000001)
RENDER_MODE_UNKNOWN
public static final int RENDER_MODE_UNKNOWN
Unknown Render Mode.
Constant Value: -1 (0xffffffff)
Public constructors
PdfPagePathObject
public PdfPagePathObject (Path path)
Constructor for the PdfPagePathObject. Sets the object type
to PdfPageObjectType.PATH.
| Parameters | |
|---|---|
path |
Path: This value cannot be null. |
Public methods
getFillColor
public int getFillColor ()
Returns the fill color of the object.
Returns Color.BLACK if ERROR(/#mFillColor) is not set.
| Returns | |
|---|---|
int |
The fill color of the object. |
getStrokeColor
public int getStrokeColor ()
Returns the stroke color of the object.
| Returns | |
|---|---|
int |
The stroke color of the object. |
getStrokeWidth
public float getStrokeWidth ()
Returns the stroke width of the object.
| Returns | |
|---|---|
float |
The stroke width of the object. |
setStrokeWidth
public void setStrokeWidth (float strokeWidth)
Sets the stroke width of the object.
| Parameters | |
|---|---|
strokeWidth |
float: The stroke width of the object. |
toPath
public Path toPath ()
Returns the path of the object. The returned path object might be an approximation of the one used to create the original one if the original object has elements with curvature.
Note: The path is immutable because the underlying library does not allow modifying the path once it is created.
| Returns | |
|---|---|
Path |
The path.
This value cannot be null. |