public class Path extends Element
| Constructor and Description |
|---|
Path()
Create a path.
|
Path(GraphicState graphicState)
Create a path with a given graphic state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCurve(Point Point1,
Point Point2,
Point Point3)
Adds a Bezier curve from the current path using the first two points specified as Bezier control points ending at the third point.
|
void |
addCurveV(Point Point1,
Point Point2)
Adds a Bezier curve from the current path.
|
void |
addCurveY(Point Point1,
Point Point2)
Adds a Bezier curve from the current path.
|
void |
addLine(Point Point)
Adds a line to the current path from the current path position.
|
void |
addRect(Point Point,
double Width,
double Height)
Adds a rectangle to the current path with the lower left corner at the give point, and with the width and height specified.
|
Path |
clone()
Makes a copy of the path.
|
Path |
clone(java.util.EnumSet<ElementCloneFlags> cloneFlags)
Makes a copy of the path.
|
void |
closePath()
Closes the current subpath.
|
Path |
colorConvert(Document document,
ColorProfile prof,
RenderIntent intent,
boolean embed)
Applies the specified ICC ColorProfile to the Path
|
void |
delete() |
GraphicState |
getGraphicState()
Get the graphic state of the current path.
|
java.util.EnumSet<PathPaintOpFlags> |
getPaintOp()
Gets the fill and stroke attributes of a path.
|
java.util.List<Segment> |
getSegments()
Get the segments of the path.
|
void |
moveTo(Point Point)
Moves the current point of the path to the given point.
|
void |
setGraphicState(GraphicState gstate)
Set the Graphic State of the current path.
|
void |
setPaintOp(java.util.EnumSet<PathPaintOpFlags> paintops)
Sets the fill and stroke attributes of a path.
|
void |
setSegments(java.util.List<Segment> segments)
Set the segments of the path.
|
public Path()
public Path(GraphicState graphicState)
graphicState - the initial graphic state for the pathpublic GraphicState getGraphicState()
May return null if this element does not have a GraphicState.
public void setGraphicState(GraphicState gstate)
gstate - the new/updated Graphic State for the path.public java.util.EnumSet<PathPaintOpFlags> getPaintOp()
public void setPaintOp(java.util.EnumSet<PathPaintOpFlags> paintops)
paintops - the flags describing the fill and stroke attributes.public void moveTo(Point Point)
Point - the coordinates of the new current point.public void addLine(Point Point)
Point - the coordinates of the endpoint of the new line.public void addRect(Point Point, double Width, double Height)
Point - the coordinates of the lower left corner of the new rectangle.Width - the width of the new rectangle.Height - the height of the new rectangle.public void addCurve(Point Point1, Point Point2, Point Point3)
Point1 - first Bezier control pointPoint2 - second Bezier control pointPoint3 - the ending Point of the Bezier curve which will also be the current point of the current path.public void addCurveV(Point Point1, Point Point2)
Point1 - first Bezier control pointPoint2 - the ending Point of the Bezier curve which will also be the new current point of the path.public void addCurveY(Point Point1, Point Point2)
Point1 - first Bezier control pointPoint2 - second Bezier control point and the ending Point of the Bezier curve which will also be the new current point of the path.public void closePath()
public Path clone()
Make a copy of an path to obtain a new path that has a distinct set of attributes.
public Path clone(java.util.EnumSet<ElementCloneFlags> cloneFlags)
Make a copy of an path to obtain a new path that has a distinct set of attributes.
public java.util.List<Segment> getSegments()
Returns a list of Segment objects, one for each segment in the path.
public void setSegments(java.util.List<Segment> segments)
segments - The segments in the path. This list must have at least one element.public Path colorConvert(Document document, ColorProfile prof, RenderIntent intent, boolean embed)
document - The document the element belongs to.prof - The ICC ColorProfile to be applied.intent - The ICC Rendering Intent for the ColorProfileembed - If true, embed the color space and make the object calibrated. If it is false and the target profile is CMYK, RGB, or Gray, the colors space of the resulting object, after conversion, will be DeviceCMYK, DeviceRGB, or DeviceGray, respectively.