Package com.itextpdf.text.pdf.parser
Class PathPaintingRenderInfo
- java.lang.Object
-
- com.itextpdf.text.pdf.parser.PathPaintingRenderInfo
-
public class PathPaintingRenderInfo extends java.lang.Object
Contains information relating to painting current path.- Since:
- 5.5.6
-
-
Field Summary
Fields Modifier and Type Field Description static int
EVEN_ODD_RULE
The even-odd rule determines whether a point is inside a path by drawing a ray from that point in any direction and simply counting the number of path segments that cross the ray, regardless of direction.static int
FILL
Value specifying fill operation to perform on the current path.private GraphicsState
gs
static int
NO_OP
End the path object without filling or stroking it.static int
NONZERO_WINDING_RULE
The nonzero winding number rule determines whether a given point is inside a path by conceptually drawing a ray from that point to infinity in any direction and then examining the places where a segment of the path crosses the ray.private int
operation
private int
rule
static int
STROKE
Value specifying stroke operation to perform on the current path.
-
Constructor Summary
Constructors Constructor Description PathPaintingRenderInfo(int operation, int rule, GraphicsState gs)
PathPaintingRenderInfo(int operation, GraphicsState gs)
If the operation isNO_OP
then the rule is ignored, otherwiseNONZERO_WINDING_RULE
is used by default.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Matrix
getCtm()
int
getLineCapStyle()
LineDashPattern
getLineDashPattern()
int
getLineJoinStyle()
float
getLineWidth()
float
getMiterLimit()
int
getOperation()
int
getRule()
-
-
-
Field Detail
-
NONZERO_WINDING_RULE
public static final int NONZERO_WINDING_RULE
The nonzero winding number rule determines whether a given point is inside a path by conceptually drawing a ray from that point to infinity in any direction and then examining the places where a segment of the path crosses the ray. Starting with a count of 0, the rule adds 1 each time a path segment crosses the ray from left to right and subtracts 1 each time a segment crosses from right to left. After counting all the crossings, if the result is 0, the point is outside the path; otherwise, it is inside. For more details see PDF spec.- See Also:
- Constant Field Values
-
EVEN_ODD_RULE
public static final int EVEN_ODD_RULE
The even-odd rule determines whether a point is inside a path by drawing a ray from that point in any direction and simply counting the number of path segments that cross the ray, regardless of direction. If this number is odd, the point is inside; if even, the point is outside. For more details see PDF spec.- See Also:
- Constant Field Values
-
NO_OP
public static final int NO_OP
End the path object without filling or stroking it. This operator shall be a path-painting no-op, used primarily for the side effect of changing the current clipping path- See Also:
- Constant Field Values
-
STROKE
public static final int STROKE
Value specifying stroke operation to perform on the current path.- See Also:
- Constant Field Values
-
FILL
public static final int FILL
Value specifying fill operation to perform on the current path. When the fill operation is performed it should use either nonzero winding or even-odd rule.- See Also:
- Constant Field Values
-
operation
private int operation
-
rule
private int rule
-
gs
private GraphicsState gs
-
-
Constructor Detail
-
PathPaintingRenderInfo
public PathPaintingRenderInfo(int operation, int rule, GraphicsState gs)
- Parameters:
operation
- One of the possible combinations ofSTROKE
andFILL
values orNO_OP
rule
- EitherNONZERO_WINDING_RULE
orEVEN_ODD_RULE
.gs
- The graphics state.
-
PathPaintingRenderInfo
public PathPaintingRenderInfo(int operation, GraphicsState gs)
If the operation isNO_OP
then the rule is ignored, otherwiseNONZERO_WINDING_RULE
is used by default. SeePathPaintingRenderInfo(int, int, GraphicsState)
-
-
Method Detail
-
getOperation
public int getOperation()
-
getRule
public int getRule()
- Returns:
- Either
NONZERO_WINDING_RULE
orEVEN_ODD_RULE
.
-
getCtm
public Matrix getCtm()
- Returns:
- Current transformation matrix.
-
getLineWidth
public float getLineWidth()
-
getLineCapStyle
public int getLineCapStyle()
-
getLineJoinStyle
public int getLineJoinStyle()
-
getMiterLimit
public float getMiterLimit()
-
getLineDashPattern
public LineDashPattern getLineDashPattern()
-
-