GoDiagram Web Reference
Paint Method (GoObject)

The Graphics object with which to draw.
The GoView provides additional context for this painting operation.
Render this object to a Graphics object.
Syntax
'Declaration
 
Public Overridable Sub Paint( _
   ByVal g As Graphics, _
   ByVal view As GoView _
) 
public virtual void Paint( 
   Graphics g,
   GoView view
)

Parameters

g
The Graphics object with which to draw.
view
The GoView provides additional context for this painting operation.
Remarks

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.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoObject Class
GoObject Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback