CombineWarp method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int CombineWarp(const TPoint * ptDstArray, TBitmapHandle BitmapSrc, const TPoint &ptSrc, int nSrcWidth, int nSrcHeight, unsigned uFlags);

Delphi Syntax

Function CombineWarp (ptDstArray: TLEADCombineWarpDstPointsArray; BitmapSrc: TBitmapHandle; ptSrc: TPoint; nSrcWidth: L_INT; nSrcHeight: L_INT; uFlags: L_UINT ): L_INT;

Overview

Refer to Combining Images.

Remarks

Combines image data from the source bitmap (the slave) and the destination bitmap (the master bitmap, already loaded in the Main control), using a perspective warp.

You can warp the entire source bitmap, or a portion of the source bitmap. To warp a portion of the source bitmap, set ptSrc, nSrcWidth and nSrcHeight accordingly. To warp the entire source bitmap, set the following:

ptSrc.x = 0;
ptSrc.y = 0;
nSrcWidth =BitmapWidth of BitmapSrc;
nSrcHeight = BitmapHeight  of BitmapSrc;

The warp area in the destination bitmap is specified in ptDstArray. The polygon specified in ptDstArray must:

image\sqrblit.gif be concave.

image\sqrblit.gif fit entirely on the destination bitmap.

If either of these conditions is FALSE, this method will return an error.

The ordering of the points in ptDstArray can affect the resulting warp. For example, if the source bitmap is the following:

image\WarpEx1.gif

then ordering the points in ptDstArray as shown below results in the following warp:

image\WarpEx2.gif

while ordering the points in ptDstArray as shown below, results in the following warp:

image\WarpEx3.gif

See Also

Element:

Combine method, Underlay metho

Topics:

Raster Images: Combining Images

 

Examining and Altering Bitmaps