StretchDeviceIndependentBits


static int StretchDeviceIndependentBits(Handle Device,
                                        int DestinationLeft,
                                        int DestinationTop,
                                        int DestinationWidth,
                                        int DestinationHeight,
                                        int SourceLeft,
                                        int SourceTop,
                                        int SourceWidth,
                                        int SourceHeight,
                                        Handle Data,
                                        BitmapInformation^ Information,
                                        unsigned Usage,
                                        unsigned RasterOperation)

This function copies a rectangle of bits from a device independent bitmap to the device context.

Parameters

Handle Device

The handle of the device context.

int DestinationLeft

The x-coordinate (in logical units) of the upper-left corner of the destination rectangle.

int DestinationTop

The y-coordinate (in logical units) of the upper-left corner of the destination rectangle.

int DestinationWidth

The width (in logical units) of the destination rectangle.

int DestinationHeight

The height (in logical units) of the destination rectangle.

int SourceLeft

The x-coordinate (in pixels) of the upper-left corner of the source rectangle.

int SourceTop

The y-coordinate (in pixels) of the upper-left corner of the source rectangle.

int SourceWidth

The width (in pixels) of the source rectangle.

int SourceHeight

The height (in pixels) of the source rectangle.

const Handle Data

A pointer to a device independent bitmap containing the rectangle.

BitmapInformation^ Information

A pointer to a bitmap information structure describing the bitmap.

unsigned Usage

The format of the bitmap color table (see Colors).

unsigned Raster

The raster options used to combine the current brush with the source and destination pixels.

Return

int

The number of scanlines copied.

Notes

If the source height has the opposite sign to the destination height, the bitmap is reflected about the x-axis.

If the source width has the opposite sign to the destination width, the bitmap is reflected about the y-axis.

If the member Compression (of the specified bitmap information structure) is set to BitmapCompress::JPEG, the source device independent bitmap is a JPEG image. The member Image is the size of the buffer holding the bitmap. The color usage parameter must be set to Colors::RedGreenBlue and the raster option to RasterOperation::SourceCopy.

When a BitmapInformation (rather than a BitmapInformation4 or BitmapInformation5) is specified, the color profile of the device context is used as the source color profile. If the device context has no color profile, the sRedGreenBlue color space is used. When a BitmapInformation4 or BitmapInformation5 is specified, the color profile contained in the structure is used.

Details

Name Space IPlusPlus::Graphics
Class Gdi
Assembly IPlusPlus.WinPlus.dll