A Shape object describes a shape consisting of a series of straight lines, arcs and Bezier curves. The main component of a shape definition is its outline, which describes the shape region that will be filled in color, and used for hit-testing and aligning links to the shape. A shape can also contain decorations - lines, arcs or Bezier curves that are drawn with the shape but do not influence the fill or hit testing.
A shape is used by applying it to a ShapeNode instance by calling the setShape method.
Namespace: com.mindfusion.diagramming
Package: com.mindfusion.diagramming
Java
![]() |
---|
public class Shape |
The Shape class provides the means for defining complex node shapes. You can design any shape composed of lines, arcs and Bézier-curves. A shape template must always contain an outline to be used for hit testing, clipping and finding intersections with other items.
The ShapeDesigner tool included in the DroidDiagram suite lets you draw custom shapes and store them in shape libraries. A library file can be loaded into your application using the ShapeLibrary class. The definitions loaded from a shape library are automatically added to the Shapes collection and can be accessed through the FromId method, just as the predefined shapes.
java.lang.Object
com.mindfusion.diagramming.Shape