public class RMPathUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
JOIN_OP_ADD |
static int |
JOIN_OP_INTERSECT |
static int |
JOIN_OP_SUBTRACT |
static int |
JOIN_OP_XOR |
Constructor and Description |
---|
RMPathUtils() |
Modifier and Type | Method and Description |
---|---|
static RMPath |
appendOval(RMPath aPath,
RMRect aRect,
float startAngle,
float sweep,
boolean connect)
Adds elements describing an oval in the given rect to this path.
|
static RMPath |
appendShape(RMPath aPath,
java.awt.Shape aShape)
Returns a new path from an AWT shape.
|
static double |
getDistance(RMPath aPath,
RMPoint aPoint)
Returns shortest distance from any point in path to given point.
|
static double |
getDistanceSigned(RMPath aPath,
RMPoint aPoint)
Returns shortest distance from any point in path to given point (negative means inside the path).
|
static RMPath |
getPathFlattened(RMPath aPath)
Returns a path with only moveto, lineto.
|
static RMPath |
getPathWithFlattendCubics(RMPath aPath)
Returns a copy of the path with cubics demoted to one or more quadratics.
|
static boolean |
hasCubics(RMPath aPath)
Returns whether the path has any cubic curves in it.
|
static boolean |
isClosed(RMPath aPath)
Returns whether given path has any open subpaths.
|
static boolean |
isPolygonal(RMPath aPath)
Returns whether path has any curve segments (QuadTo, CurveTo).
|
static RMPath |
join(java.util.List paths,
int aJoinOp)
Returns the combined paths from given paths.
|
static void |
quadraticCurveTo(RMPath aPath,
RMPoint cp1,
RMPoint cp2,
RMPoint aPoint)
This is effectively a curveTo but does it internally with one or more approximated quadratics.
|
public static final int JOIN_OP_ADD
public static final int JOIN_OP_SUBTRACT
public static final int JOIN_OP_INTERSECT
public static final int JOIN_OP_XOR
public static RMPath appendShape(RMPath aPath, java.awt.Shape aShape)
public static RMPath appendOval(RMPath aPath, RMRect aRect, float startAngle, float sweep, boolean connect)
public static boolean isClosed(RMPath aPath)
public static boolean isPolygonal(RMPath aPath)
public static boolean hasCubics(RMPath aPath)
public static RMPath getPathFlattened(RMPath aPath)
public static RMPath getPathWithFlattendCubics(RMPath aPath)
public static void quadraticCurveTo(RMPath aPath, RMPoint cp1, RMPoint cp2, RMPoint aPoint)
public static double getDistance(RMPath aPath, RMPoint aPoint)
public static double getDistanceSigned(RMPath aPath, RMPoint aPoint)
public static RMPath join(java.util.List paths, int aJoinOp)