Bitmap.DrawOn Method (IntPtr, Int32, Int32, CombineMode, Single)

Draws the current bitmap on a given Windows GDI device context (represented as handle to device context, i.e. HDC).

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public void DrawOn(
	IntPtr hdc,
	int destinationX,
	int destinationY,
	CombineMode combine,
	float opacity
)

Parameters

hdc

Type: System.IntPtr

A handle to device context on which the current bitmap should be drawn.
destinationX

Type: System.Int32

The x-coordinate of the upper-left corner of the drawn image.
destinationY

Type: System.Int32

The y-coordinate of the upper-left corner of the drawn image.
combine

Type: Aurigma.GraphicsMill.Transforms.CombineMode

The images blending algorithm (plain pixels copying, alpha blending, bitwise operations, etc).
opacity

Type: System.Single

The opacity of the image in range [0, 1]. If 0, image is completely transparent, if 1, image is completely opaque.

Remarks

The bitmap is drawn to the destination rectangle on the given HDC with dimensions equal to the dimensions of the bitmap.

Note

If the 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 the bitmap to some GDI-compatible format (like Format32bppArgb) to increase the performance.

See Also

Reference

Manual