Bink SDK 1.5v

BinkBufferSetScale

The function BinkBufferSetScale sets a new shrinking or stretching scale to use during blitting.

S32 BinkBufferSetScale(
  HBINKBUFFER bink_buf,
  U32 width,
  U32 height
);

In Parameters

bink_buf
Specifies the BinkBuffer handle.
width
Specifies the width that you would like the blitting stretched or shrunk to.
height
Specifies the height that you would like the blitting stretched or shrunk to.

Returns

Returns whether the BinkBuffer was successfully able to use this scale (non-zero) or whether the specified scale was invalid (zero).

Discussion

This function sets a new shrink/stretch scale to use. Not all of the blitting styles can do shrinking or stretching, so be sure to specify one of the BINKBUFFERSTRETCHX, BINKBUFFERSTRETCHY, BINKBUFFERSHRINKX, or BINKBUFFERSHRINKY constants when you open the BinkBuffer, or your scale factor may be ignored. Stretching and shrinking is almost always faster (even in hardware) when using an integral factor (2x, for example). The WindowWidth and WindowHeight fields in the BinkBuffer structure will be updated to new sizes if this function is successful. This function returns non-zero if the BinkBuffer is able to perform the scale, or zero if the BinkBuffer is unable to scale.


Group: BinkBuffer API
Related Sections: Scaling
Related Functions: BinkBufferOpen
Related Basic Types: BINKBUFFER_OPEN_FLAGS, HBINKBUFFER, S32, U32

For technical support, e-mail Bink1@radgametools.com
© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.