[Serializable()] public abstract class GoShape : GoObject
Pen
to draw an outline and an optional Brush
to fill the outline.[Serializable()] public abstract class GoShape : GoObject
There are several very commonly used classes inheriting from GoShape
: GoRectangle, GoRoundedRectangle, and GoEllipse. The following classes allow you to determine the shape: GoStroke for straight and curved multi-segment lines, GoPolygon for closed figures using straight or curved sides, and most generally, GoDrawing. GoDrawing also supports many predefined shapes that you can specify with the GoFigure enumeration. Other shape classes provide properties to easily specify particular characteristics, and they may provide specialized resizing behavior.
Although it is most common to use the predefined Brushes given by the System.Drawing.Brushes class, you can also set the Brush property to any SolidBrush or HatchBrush, as well as many kinds of simple LinearGradientBrush or PathGradientBrush. Be sure to construct and completely initialize the Brush before assigning it to the Brush property -- you may not modify a Brush after assigning it to a Brush property defined by GoDiagram.
It is also very common to assign the BrushColor, BrushStyle, BrushForeColor, BrushMidColor, and BrushMidFraction properties.
For somewhat more complex effects, there are several Fill... methods defined on GoShape that set the Brush property to commonly used LinearGradientBrushes or PathGradientBrushes.
As with brushes, you can set the Pen property to any of the predefined System.Drawing.Pens, or you can construct your own Pen. Be sure to construct and completely initialize the Pen before assigning it to the Pen property -- you may not modify a Pen after assigning it to a Pen property defined by GoDiagram.
It is also very common to assign the PenColor and PenWidth properties.