Name
TransformImage -- transform a vector image (V5.0)
Synopsis
int ok = TransformImage(APTR handle, struct hwMatrix2D *m, int width,
              int height);
Function
This function must transform the specified vector image according to the 2D transformation matrix passed in parameter 2. It must also clip the resulting image to the specified width and height in pixels. After calling TransformImage(), Hollywood will then call your plugin's GetImage() function again to obtain the raw pixel data of the newly transformed image. It is very important that the dimensions and the pixel array returned by the next call to GetImage() match the dimensions passed to TransformImage() in parameters 3 and 4 exactly.

TransformImage() is only ever called for images of type HWIMAGETYPE_VECTOR. If your LoadImage() function sets the image type to HWIMAGETYPE_RASTER, TransformImage() won't be called at all and Hollywood will do all image transformations on its own.

If the transformation was successful, TransformImage() must return True. Otherwise it has to return False.

Inputs
handle
image handle as returned by LoadImage()
m
2D matrix describing the desired transformation
width
clipping width for resulting image
height
clipping height for resulting image
Results
ok
True or False indicating success or failure

Show TOC