Win_StretchDibits

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > Windows API >

Win_StretchDibits

 

Description

 

Copies the color data for a rectangle of pixels in a DIB to the specified destination rectangle. If the destination rectangle is larger than the source rectangle, this function stretches the rows and columns of color data to fit the destination rectangle. If the destination rectangle is smaller than the source rectangle, this function compresses the rows and columns by using the specified raster operation.

 

Syntax

 

n = Win_StretchDibits(hdc, x, y, dx, dy, SrcX, SrcY, nSrcWidth, nSrcHeight, lpBits, lpBitsInfo, uUsage, dwRop)

 

Returns

 

Number.

 

Parameters

 

Name

Type

Optional

Meaning

hdc

Number

No

Handle to the destination device context

x

Number

No

x-coordinate, in logical units, of the upper-left corner of the destination rectangle

y

Number

No

y-coordinate, in logical units, of the upper-left corner of the destination rectangle

dx

Number

No

width, in logical units, of the destination rectangle

dy

Number

No

height, in logical units, of the destination rectangle

SrcX

Number

No

x-coordinate, in pixels, of the source rectangle in the DIB

SrcY

Number

No

y-coordinate, in pixels, of the source rectangle in the DIB

nSrcWidth

Number

No

width, in pixels, of the source rectangle in the DIB

nSrcHeight

Number

No

height, in pixels, of the source rectangle in the DIB

lpBits

UDT

No

Pointer to the DIB bits, which are stored as an array of bytes

lpBitsInfo

UDT

No

A BITMAPINFO structure that contains information about the DIB

uUsage

Number

No

Specifies whether the bmiColors member of the BITMAPINFO structure was provided and, if so, whether bmiColors contains explicit red, green, blue (RGB) values or indexes. The uUsage parameter must be one of the following values:

 

%DIB_PAL_COLORS

The array contains 16-bit indexes into the logical palette of the source device context.

%DIB_RGB_COLORS

The color table contains literal RGB values.

 

dwRop

Number

No

Specifies how the source pixels, the destination device context's current brush, and the destination pixels are to be combined to form the new image

 

Remarks

 

For additional info, please refer to MS documentation at: http://msdn.microsoft.com/en-us/library/dd145121(VS.85).aspx

 

Restrictions

 

See also

 

Examples