Northwoods.GoWeb Assembly > Northwoods.GoWeb Namespace > GoObject Class : Paint Method |
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.
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