Name
GetFrame -- get raw pixel frame data (V9.0)
Synopsis
ULONG *raw = GetFrame(APTR handle, struct LoadAnimCtrl *ctrl);
Function
This function is optional and must only be implemented if the HWEXT_ANIM_VECTOR extension bit has been set. See Extension plugins for details. If that is the case, this function must return the frame's raw pixel data and some information about it. The pixel data needs to be returned as an array of 32-bit ARGB values. and GetFrame() also needs to take possible transformations that have been applied via TransformFrame() into account.

Note that GetFrame() is only called for vector anims. For raster anims, Hollywood will obtain the pixel data from LoadFrame().

Furthermore, GetFrame() has to provide some additional information in the struct LoadAnimCtrl pointer that is passed as the second parameter. See OpenAnim for details on this structure. The following information has to be provided by GetFrame():

Width:
Must be set to the frame width in pixels. If TransformFrame() has been called prior to GetFrame(), this value must exactly match the width that has been passed to the last call of TransformFrame().

Height:
Must be set to the frame height in pixels. If TransformFrame() has been called prior to GetFrame(), this value must exactly match the height that has been passed to the last call of TransformFrame().

LineWidth:
Must be set to the frame modulo width in pixels. This is often the same as the frame width.

AlphaChannel:
Must be set to True or False, depending on whether or not this frame has an alpha channel.

The pointer that is returned by GetFrame() must stay valid at least until the next call to GetFrame() or FreeVectorFrame() on this handle.

Inputs
handle
frame handle as returned by LoadFrame()
ctrl
pointer to a struct LoadAnimCtrl for storing information about the frame
Results
raw
an array of raw pixel data

Show TOC