Draws current bitmap on given Windows GDI device context (represented as handle to device context, i.e. HDC).
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public Sub Draw ( _ hdc As IntPtr, _ destinationRectangle As RectangleF, _ sourceRectangle As RectangleF, _ combine As CombineMode, _ opacity As Single, _ interpolationMode As InterpolationMode _ )
public void Draw( IntPtr hdc, RectangleF destinationRectangle, RectangleF sourceRectangle, CombineMode combine, float opacity, InterpolationMode interpolationMode )
Type: System.IntPtr
Target handle to device context (on which current bitmap should be drawn).Type: System.Single
A number in range [0, 1] specifying total opacity of the image. If 0, image is completely transparent, if 1, image is completely opaque.Pixels from source rectangle of current bitmap are drawn to destination rectangle on the given HDC. If source rectangle dimensions differ from dimensions of destination rectangle, pixels are resized to have the same size as destination rectangle.
If bitmap has pixel format which is not GDI-compatible (e.g. extended pixel formats, CMYK, etc) method will automatically create a copy converted to the Format32bppArgb. That's why you always get it drawn, but if you are going to call this method multiple times, it is recommended to convert it to some GDI-compatible format (like Format32bppArgb) to increase the performance.
If you want method to calculate width and height automatically, you can pass 0 to these arguments. It will be calculated with the following way:
All coordinates are measured in units specified with Unit property of the source bitmap.