Parameters
- g
- The
Graphics
object with which to draw. - view
- The GoView provides additional context for this painting operation.
Graphics
object with which to draw.
Graphics
object with which to draw.This method may get called frequently and should not modify any object or view state.
The default implementation paints nothing. Each derived class should override this method.
The view parameter is useful for customizing the drawing behavior based on the kind of view to which we are drawing. For example, the GoView.GoView.ShadowOffset property specifies the size of the drop shadow painted by objects whose Shadowed property is true.
If you override this method, you may also need to override ExpandPaintBounds, and perhaps the other geometry methods, including ComputeBounds, ContainsPoint, ContainedByRectangle, GetNearestIntersectionPoint(PointF,PointF,PointF), and other methods such as AddSelectionHandles and DoResize.
Furthermore, in the implementation of a property setter that causes the paint bounds to change, you will need to call InvalidateViews before actually changing your object's state, so that views will get a chance to notice the paint bounds before it changes.