fg_sheardcb()

Win32 DirectX Fastgraph/Light

Prototype

void fg_sheardcb (void *source, void *dest, int width, int height, int new_size, int type);

Sub fg_sheardcb (source() As Any, dest() As Any, ByVal width As Long, ByVal height As Long, ByVal new_size As Long, ByVal type As Long)

procedure fg_sheardcb (var source, dest; width, height, new_size, type : integer);

Description

The fg_sheardcb() function shears a direct color bitmap. Shearing may be thought of as anchoring one corner of an image and stretching the opposite corner horizontally or vertically.

For high color virtual buffers, each pixel in the bitmaps is a 16-bit (two byte) encoded RGB value. For true color virtual buffers, each pixel is a 24-bit (three byte) RGB value, stored blue byte first, then green byte, then red byte.

Parameters

source is the name of the array containing the direct color bitmap to be sheared.

dest is the name of the array that will receive the resulting sheared direct color bitmap.

width is the source bitmap width in pixels. It must be greater than zero.

height is the source bitmap height in pixels. It must be greater than zero.

new_size is the width in pixels (for horizontal shears) or height in pixels (for vertical shears) of the resulting dest bitmap. It must be at least as large as the corresponding dimension in the source bitmap..

type is a code indicating the shear type and direction, as shown here:

0 = Horizontal shear to the left (bottom edge is stretched to the right)

1 = Horizontal shear to the right (top edge is stretched to the right)

2 = Vertical shear to the left (left edge is stretched up)

3 = Vertical shear to the right (right edge is stretched up)

Return value

none

Restrictions

The maximum allowable width or height of source and dest is 8,192 pixels.

See also

fg_shear()

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.