Package com.itextpdf.awt.geom
Class GeneralPath
java.lang.Object
com.itextpdf.awt.geom.GeneralPath
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
The buffers capacityprivate static final int
The buffers size(package private) float[]
The points buffer(package private) static int[]
The space amount in points buffer for different segmenet's types(package private) int
The points buffer size(package private) int
The path rule(package private) byte[]
The point's types buffer(package private) int
The point's type buffer sizestatic final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionGeneralPath
(int rule) GeneralPath
(int rule, int initialCapacity) GeneralPath
(Shape shape) -
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(PathIterator path, boolean connect) void
(package private) void
checkBuf
(int pointCount, boolean checkMove) Checks points and types buffer size to add pointCount points.clone()
void
boolean
contains
(double px, double py) boolean
contains
(double rx, double ry, double rw, double rh) boolean
boolean
void
curveTo
(float x1, float y1, float x2, float y2, float x3, float y3) getPathIterator
(AffineTransform t, double flatness) int
boolean
intersects
(double rx, double ry, double rw, double rh) boolean
(package private) boolean
isInside
(int cross) Checks cross count according to path rule to define is it point inside shape or not.void
lineTo
(float x, float y) void
moveTo
(float x, float y) void
quadTo
(float x1, float y1, float x2, float y2) void
reset()
void
setWindingRule
(int rule) void
-
Field Details
-
WIND_EVEN_ODD
public static final int WIND_EVEN_ODD- See Also:
-
WIND_NON_ZERO
public static final int WIND_NON_ZERO- See Also:
-
BUFFER_SIZE
private static final int BUFFER_SIZEThe buffers size- See Also:
-
BUFFER_CAPACITY
private static final int BUFFER_CAPACITYThe buffers capacity- See Also:
-
types
byte[] typesThe point's types buffer -
points
float[] pointsThe points buffer -
typeSize
int typeSizeThe point's type buffer size -
pointSize
int pointSizeThe points buffer size -
rule
int ruleThe path rule -
pointShift
static int[] pointShiftThe space amount in points buffer for different segmenet's types
-
-
Constructor Details
-
GeneralPath
public GeneralPath() -
GeneralPath
public GeneralPath(int rule) -
GeneralPath
public GeneralPath(int rule, int initialCapacity) -
GeneralPath
-
-
Method Details
-
setWindingRule
public void setWindingRule(int rule) -
getWindingRule
public int getWindingRule() -
checkBuf
void checkBuf(int pointCount, boolean checkMove) Checks points and types buffer size to add pointCount points. If necessary realloc buffers to enlarge size.- Parameters:
pointCount
- - the point count to be added in buffer
-
moveTo
public void moveTo(float x, float y) -
lineTo
public void lineTo(float x, float y) -
quadTo
public void quadTo(float x1, float y1, float x2, float y2) -
curveTo
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) -
closePath
public void closePath() -
append
-
append
-
getCurrentPoint
-
reset
public void reset() -
transform
-
createTransformedShape
-
getBounds2D
- Specified by:
getBounds2D
in interfaceShape
-
getBounds
-
isInside
boolean isInside(int cross) Checks cross count according to path rule to define is it point inside shape or not.- Parameters:
cross
- - the point cross count- Returns:
- true if point is inside path, or false otherwise
-
contains
public boolean contains(double px, double py) -
contains
public boolean contains(double rx, double ry, double rw, double rh) -
intersects
public boolean intersects(double rx, double ry, double rw, double rh) - Specified by:
intersects
in interfaceShape
-
contains
-
contains
-
intersects
- Specified by:
intersects
in interfaceShape
-
getPathIterator
- Specified by:
getPathIterator
in interfaceShape
-
getPathIterator
- Specified by:
getPathIterator
in interfaceShape
-
clone
-