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





hDC
The handle to the Device Context on which to draw the image
dstRect
The coordinates of the rectangle where the image will be drawn
srcRect
The portion of the image to draw

Glossary Item Box

Draws the image on the handle to the Device Context at the specified location and size.

Syntax

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

Parameters

hDC
The handle to the Device Context on which to draw the image
dstRect
The coordinates of the rectangle where the image will be drawn
srcRect
The portion of the image to draw

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.