ImageEn, unit imageenproc |
|
TImageEnProc.ProjectDraw
Declaration
function ProjectDraw(Source: TIEBitmap; centerDestX: Integer; centerDestY: Integer; destWidth: Integer; destHeight: Integer; depth: Double; translateX: Integer; translateY: Integer; rotateX: Double; rotateY: Double; specularAlphaMin: Integer; specularAlphaMax: Integer; mergeAlpha: Boolean = false): TIEQuadCoords;
function ProjectDraw(Source: TIEBitmap; centerDestX: Integer; centerDestY: Integer; scale: Double; depth: Double; translateX: Integer; translateY: Integer; rotateX: Double; rotateY: Double; specularAlphaMin: Integer; specularAlphaMax: Integer; mergeAlpha: Boolean = false): TIEQuadCoords;
Description
Draw the source bitmap over current layer, performing translations, rotations and perspective transform.
Parameter | Description |
Source | Source bitmap to draw |
centerDestX | Horizontal position of center of destination position |
centerDestY | Vertical position of center of destination position |
destWidth | Destination bounding box width, not including specular bitmap. The resulting bitmap will be adapted (but not stretched) to this size |
destHeight | Destination bounding box height, not including specular bitmap. The resulting bitmap will be adapted (but not stretched) to this size |
scale | Replaces destWidth and destHeight in the second overload. Specifies a multiplier of the original size (1=same size, 0.5=half size, etc..) |
depth | Destination depth of field |
translateX | Horizontal offset in 3D space (before perspective projection) |
translateY | Vertical offset in 3D space (before perspective projection) |
rotateX | X axis rotations in 3D space (before perspective projection). Angles are in degrees |
rotateY | Y axis rotations in 3D space (before perspective projection). Angles are in degrees |
specularAlphaMin | If >-1 a reflection bitmap will be drawn, using specified alpha range |
specularAlphaMax | If >-1 a reflection bitmap will be drawn, using specified alpha range |
mergeAlpha | If image alpha channel is merged with the background image |
Returns coordinates of four points of stretched bitmap.
Note: If the image
PixelFormat is not ie24RGB, it will be converted
| Demos\Display\ProjectDraw\ProjectDraw.dpr |
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
// Project Draw image at 200, 200 (center), inside a box of 150x150, depth 400, rotating by 30° on Y axis, with specular effect
ImageEnView1.IEBitmap.Allocate( 600, 600, clBlack );
ImageEnView1.Proc.ProjectDraw( bmp, // Source
300, 160, // Dest pos (Center)
300, 300, // Dest size
400, // Depth
0, 0, // Translation (offset)
0, 30 // Rotation
0, 100 ); // Alpha Min/Max