ImageMan.Net Version 3 Summer 2012 Release
Draw(Graphics,Rectangle) Method
See Also  Send Feedback
DTI.ImageMan Namespace > ImImage Class > Draw Method : Draw(Graphics,Rectangle) Method





surface
The Graphics object on which to draw the image
dstRect
The coordinates of the rectangle where the image will be drawn

Glossary Item Box

Draws the image on the specified Graphics surface at the specified location and size.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Draw( _
   ByVal surface As System.Drawing.Graphics, _
   ByVal dstRect As System.Drawing.Rectangle _
) 
Visual Basic (Usage)Copy Code
Dim instance As ImImage
Dim surface As System.Drawing.Graphics
Dim dstRect As System.Drawing.Rectangle
 
instance.Draw(surface, dstRect)
C# 
public void Draw( 
   System.Drawing.Graphics surface,
   System.Drawing.Rectangle dstRect
)
JScript 
public function Draw( 
   surface : System.Drawing.Graphics,
   dstRect : System.Drawing.Rectangle
);
Managed Extensions for C++ 
public: void Draw( 
   System.Drawing.Graphics* surface,
   System.Drawing.Rectangle dstRect
) 
C++/CLI 
public:
void Draw( 
   System.Drawing.Graphics^ surface,
   System.Drawing.Rectangle dstRect
) 

Parameters

surface
The Graphics object on which to draw the image
dstRect
The coordinates of the rectangle where the image will be drawn

Remarks

Since StretchDIBits is used to do the drawing the image will be less then optimally displayed if the image is of a different size than the Graphics drawing surface. The Winforms control will scale the image to the surface prior to displaying it. This will lead to much better results.

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

© 2014 Data Techniques, Inc. All Rights Reserved.