Click or drag to resize

DisplayPipelineDrawBitmap Method (DisplayBitmap, Int32, Int32, Int32, Int32, Transform2d)

Draws a bitmap in screen coordinates, scaled to fit the given size, through a 2d transform.

Namespace:  Rhino.Display
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public void DrawBitmap(
	DisplayBitmap bitmap,
	int left,
	int top,
	int width,
	int height,
	Transform2d transform
)

Parameters

bitmap
Type: Rhino.DisplayDisplayBitmap
bitmap to draw
left
Type: SystemInt32
where the left edge of the bitmap should appear in screen coordinates
top
Type: SystemInt32
where the top edge of the bitmap should appear in screen coordinates
width
Type: SystemInt32
width (in pixels) to draw the bitmap at
height
Type: SystemInt32
height (in pixels) to draw the bitmap at
transform
Type: Rhino.GeometryTransform2d
A 2d transform applied to the destination rectangle when the bitmap is drawn, in viewport pixels - the same space left, top, width and height are in. It moves the rectangle the image lands on and nothing else, so a rotation, a shear or a non-uniform scale all work and the image is resampled to suit.
Remarks
The transform is honoured by the shader based display engines. The GDI engine and the fixed function OpenGL fallback blit the image at a screen position and have no matrix to apply it with, so on those the bitmap is drawn untransformed.
See Also