[]
        
(Showing Draft Content)

C1.Util.DX.Direct2D.RenderTarget.DrawBitmap

DrawBitmap Method

DrawBitmap(Bitmap, float, BitmapInterpolationMode)

Draws the specified bitmap after scaling it to the size of the specified rectangle.

Declaration
public void DrawBitmap(Bitmap bitmap, float opacity, BitmapInterpolationMode interpolationMode)
Parameters
Type Name Description
Bitmap bitmap

The bitmap to render.

float opacity

A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents. The default value is 1.0f.

BitmapInterpolationMode interpolationMode

The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation. The default value is C1.Win.DX.Direct2D.BitmapInterpolationMode.Linear.

DrawBitmap(Bitmap, RectF, float, BitmapInterpolationMode)

Draws the specified bitmap after scaling it to the size of the specified rectangle.

Declaration
public void DrawBitmap(Bitmap bitmap, RectF destinationRectangle, float opacity = 1, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.Linear)
Parameters
Type Name Description
Bitmap bitmap

The bitmap to render.

RectF destinationRectangle

The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn; NULL to draw the selected portion of the bitmap at the origin of the render target. If the rectangle is specified but not well-ordered, nothing is drawn, but the render target does not enter an error state.

float opacity

A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents. The default value is 1.0f.

BitmapInterpolationMode interpolationMode

The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation. The default value is Linear.

DrawBitmap(Bitmap, float, BitmapInterpolationMode, RectF)

Draws the specified bitmap after scaling it to the size of the specified rectangle.

Declaration
public void DrawBitmap(Bitmap bitmap, float opacity, BitmapInterpolationMode interpolationMode, RectF sourceRectangle)
Parameters
Type Name Description
Bitmap bitmap

The bitmap to render.

float opacity

A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents. The default value is 1.0f.

BitmapInterpolationMode interpolationMode

The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation. The default value is C1.Win.DX.Direct2D.BitmapInterpolationMode.Linear.

RectF sourceRectangle

The size and position, in device-independent pixels in the bitmap's coordinate space, of the area within the bitmap to be drawn; NULL to draw the entire bitmap.

DrawBitmap(Bitmap, RectF?, float, BitmapInterpolationMode, RectF?)

void ID2D1RenderTarget::DrawBitmap([In] ID2D1Bitmap* bitmap,[In, Optional] const D2D_RECT_F* destinationRectangle,[In] float opacity,[In] D2D1_BITMAP_INTERPOLATION_MODE interpolationMode,[In, Optional] const D2D_RECT_F* sourceRectangle)

Declaration
public void DrawBitmap(Bitmap bitmap, RectF? destinationRectangle, float opacity, BitmapInterpolationMode interpolationMode, RectF? sourceRectangle)
Parameters
Type Name Description
Bitmap bitmap
RectF? destinationRectangle
float opacity
BitmapInterpolationMode interpolationMode
RectF? sourceRectangle