public static class SmartShape.Util
extends java.lang.Object
SmartShape
implementations. The inheritance hierarchy of Ice-generated objects
doesn't allow for simply subclassing .Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static void |
appendDbPoint(java.lang.StringBuilder sb,
double x,
double y) |
static void |
appendDbPoint(java.lang.StringBuilder sb,
Point p) |
static boolean |
appendSegment(java.lang.StringBuilder sb,
boolean first,
double x,
double y) |
static void |
appendSvgPoint(java.lang.StringBuilder sb,
double x,
double y) |
static void |
appendSvgPoint(java.lang.StringBuilder sb,
Point p) |
static boolean |
checkNonNull(java.util.List<Point> points)
Used from assert statements of the form:
|
static java.awt.geom.AffineTransform |
getAwtTransform(AffineTransform transform) |
static java.util.Set<java.awt.geom.Point2D> |
getQuantizedLinePoints(java.awt.geom.Line2D line,
java.util.Set<java.awt.geom.Point2D> points) |
static java.awt.Shape |
parseAwtPath(java.lang.String str) |
static java.util.List<Point> |
parsePoints(java.lang.String str) |
static java.lang.String |
parsePointsToPath(java.lang.String str,
boolean close) |
static java.util.List<Point> |
points(double x,
double y,
double w,
double h)
Returns the four corner points of a rectangle
|
static void |
pointsByBoundingBox(java.awt.Shape s,
java.awt.geom.Rectangle2D r,
SmartShape.PointCallback cb) |
static java.lang.String |
pointsToPath(java.util.List<Point> points,
boolean close) |
static java.awt.Shape |
transformAwtShape(java.awt.Shape shape,
AffineTransform transform) |
public static boolean checkNonNull(java.util.List<Point> points)
assert Util.checkNonNull(points) : "Null points in " + this;in all the implementations of
SmartShape.asPoints()
.points
- the pointsNullPointerException
public static void appendDbPoint(java.lang.StringBuilder sb, Point p)
public static void appendDbPoint(java.lang.StringBuilder sb, double x, double y)
public static void appendSvgPoint(java.lang.StringBuilder sb, Point p)
public static void appendSvgPoint(java.lang.StringBuilder sb, double x, double y)
public static boolean appendSegment(java.lang.StringBuilder sb, boolean first, double x, double y)
public static java.lang.String pointsToPath(java.util.List<Point> points, boolean close)
public static java.lang.String parsePointsToPath(java.lang.String str, boolean close)
public static java.awt.Shape parseAwtPath(java.lang.String str)
public static java.util.List<Point> parsePoints(java.lang.String str)
public static java.util.List<Point> points(double x, double y, double w, double h)
x
- the top-left corner's x coordinate (the lowest x)y
- the top-left corner's y coordinate (the lowest y)w
- width of the rectangle so that x+w gives the highest xh
- height of the rectange so taht y+h gives the highest ypublic static void pointsByBoundingBox(java.awt.Shape s, java.awt.geom.Rectangle2D r, SmartShape.PointCallback cb)
public static java.awt.geom.AffineTransform getAwtTransform(AffineTransform transform)
public static java.awt.Shape transformAwtShape(java.awt.Shape shape, AffineTransform transform)
public static java.util.Set<java.awt.geom.Point2D> getQuantizedLinePoints(java.awt.geom.Line2D line, java.util.Set<java.awt.geom.Point2D> points)