LEADTOOLS Annotations (Leadtools.Annotations assembly)
LEAD Technologies, Inc

DrawObject Method (AnnObject)






The Graphics surface on which to draw this AnnObject.
Draws this AnnObject on the specified surface.
Syntax
protected virtual void DrawObject( 
   Graphics graphics
)
'Declaration
 
Protected Overridable Sub DrawObject( _
   ByVal graphics As Graphics _
) 
'Usage
 
Dim instance As AnnObject
Dim graphics As Graphics
 
instance.DrawObject(graphics)
protected virtual void DrawObject( 
   Graphics graphics
)
 function Leadtools.Annotations.AnnObject.DrawObject( 
   graphics 
)
protected:
virtual void DrawObject( 
   Graphics^ graphics
) 

Parameters

graphics
The Graphics surface on which to draw this AnnObject.
Remarks

This method is called internally by the annotation framework whenever the Draw method is called. You do not need to call this method directly.

If an object is invisible (Visible is set to false), it will not draw itself.

By default, this method will draw the same graphics path returned from the GetGraphicsPath method when the AnnGetGraphicsPathMode is set to DrawObject. For simple objects such as lines and rectangles, this is sufficient. More complex objects that contain elements that either cannot be expressed by a graphics path (such as images) or elements that are too expensive to be expressed by a path (such as text) override this method to draw the object directly.

This method has the following logic:

  1. Calls the BeginDraw method that determines if the object is visible and sets up the object's PhysicalTransform matrix into the g graphics
  2. Calls GetGraphicsPath with AnnGetGraphicsPathMode set to DrawObject to get the graphics path that represents this object
  3. Uses the AnnDrawable.HasBrush method to check if this object implements a brush and if so, fills the interior of the graphics path with the System.Drawing.Brush
  4. Uses the AnnDrawable.HasPen method to check if this object implements a pen and if so, draws the outside of the graphics path with the System.Drawing.Pen
  5. Calls EndDraw to reset the g transformation

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

AnnObject Class
AnnObject Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.