Class ShapeGeometry
The outlines of the preset shapes, as com.codename1.ui.geom.GeneralPaths.
Names are OOXML's preset geometry names (ECMA-376 part 1, 20.1.10.56), which every reader maps its own shapes to. The same path fills and strokes on the screen and in PDF export, so a shape looks identical on both. Unknown names draw as a rectangle.
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeneralPathThe outline of an arrowhead at the end of a line, for drawingLineStyleheads and tails.static booleanTrue when the name is one of the presets drawn exactly.static booleanTrue for the line and connector presets, which are stroked and never filled.static GeneralPathpath(ShapeElement shape, float w, float h) The outline of a shape in its own box, from (0, 0) to (w,h), before rotation and flipping.static GeneralPathThe outline of a preset with its default adjustments.static String[]presets()The preset names drawn exactly; any other name is drawn as a rectangle.
-
Method Details
-
presets
The preset names drawn exactly; any other name is drawn as a rectangle.
Returns
a copy of the names
-
isKnown
True when the name is one of the presets drawn exactly.
Parameters
name: a preset name
Returns
true when known
-
isLine
True for the line and connector presets, which are stroked and never filled.
Parameters
name: a preset name
Returns
true for a line
-
path
The outline of a shape in its own box, from (0, 0) to (
w,h), before rotation and flipping.Parameters
-
shape: the shape -
w: the box width in any unit -
h: the box height in the same unit
Returns
the path
-
-
path
The outline of a preset with its default adjustments.
Parameters
-
name: the preset name -
w: the box width -
h: the box height
Returns
the path
-
-
arrowHead
public static GeneralPath arrowHead(String kind, float tipX, float tipY, float fromX, float fromY, float size) The outline of an arrowhead at the end of a line, for drawing
LineStyleheads and tails.Parameters
-
kind: aLineStyle.ARROW_constant -
tipX: the tip -
tipY: the tip -
fromX: a point the line comes from -
fromY: a point the line comes from -
size: the head's length
Returns
the path, or null for no head
-
-