Class GeneralPath
java.lang.Object
com.itextpdf.awt.geom.GeneralPath
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intThe buffers capacityprivate static final intThe 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) intThe points buffer size(package private) intThe path rule(package private) byte[]The point's types buffer(package private) intThe point's type buffer sizestatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionGeneralPath(int rule) GeneralPath(int rule, int initialCapacity) GeneralPath(Shape shape) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(PathIterator path, boolean connect) void(package private) voidcheckBuf(int pointCount, boolean checkMove) Checks points and types buffer size to add pointCount points.clone()voidbooleancontains(double px, double py) booleancontains(double rx, double ry, double rw, double rh) booleanbooleanvoidcurveTo(float x1, float y1, float x2, float y2, float x3, float y3) getPathIterator(AffineTransform t, double flatness) intbooleanintersects(double rx, double ry, double rw, double rh) boolean(package private) booleanisInside(int cross) Checks cross count according to path rule to define is it point inside shape or not.voidlineTo(float x, float y) voidmoveTo(float x, float y) voidquadTo(float x1, float y1, float x2, float y2) voidreset()voidsetWindingRule(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:
getBounds2Din 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
-
contains
-
intersects
public boolean intersects(double rx, double ry, double rw, double rh) - Specified by:
intersectsin interfaceShape
-
contains
-
contains
-
intersects
- Specified by:
intersectsin interfaceShape
-
getPathIterator
- Specified by:
getPathIteratorin interfaceShape
-
getPathIterator
- Specified by:
getPathIteratorin interfaceShape
-
clone
-