Win32 DirectX Fastgraph/Light


void fg_blendvbv (void *foreground, void *background, void *opacity, int width, int height);

Sub fg_blendvbv (foreground() As Any, background() As Any, opacity() As Any, ByVal width As Long, ByVal height As Long)

procedure fg_blendvbv (var foreground, background, opacity; width, height : integer);


The fg_blendvbv() function computes an alpha-blended image from the specified foreground and background bitmaps using the specified opacity bitmap. The resulting alpha-blended image is written to the active virtual buffer; the current graphics position defines the lower left corner of the blending region.


foreground is the name of the array containing the foreground direct color bitmap.

background is the name of the array containing the background direct color bitmap. If background is NULL (nil^ for Delphi, ByVal 0 for Visual Basic, or BYVAL %NULL for PowerBASIC), fg_blendvbv() gets the background pixels from the same area of the active virtual buffer where the blended pixels will be written.

opacity is the name of the array containing the opacity values, represented as a 256-color bitmap.

width is the width of each direct color bitmap in pixels.

height is the height of each direct color bitmap in pixels.

Return value



This function is meaningful only with direct color virtual buffers.

See also

fg_blend(), fg_blend50(), fg_blenddcb(), fg_blendvar(), fg_blendvb()

Fastgraph Home Page


copyright 2001 Ted Gruber Software, Inc.