DrawRectLin

Draws a solid filled rectangle with a linear source address.

Declaration

void NAPI GA_2DRenderFuncs::DrawRectLin(
N_int32 dstOfs,
N_int32 dstPitch,
N_int32 left,
N_int32 top,
N_int32 width,
N_int32 height,
GA_color color,
N_int32 mix)

Prototype In

snap/graphics.h

Parameters

dstOfs | Offset of destination rectangle in video memory
dstPitch | Pitch of destination rectangle in bytes
left | Left coordinate of the rectangle to draw
top | Top coordinate of the rectangle to draw
width | Width of the rectangle in pixels
height | Height of the rectangle in scanlines
color | Color to draw rectangle in
mix | Mix code to draw with (GA_mixCodesType)

Description

This function is identical to the DrawRect function, except that it also takes a destination linear offset, pitch, color and mix. This function is intended primarily for high performance DirectDraw compatibility for hardware that supports non-conforming linear memory addressing. For hardware that implements only (x,y) addressing, this function should not be implemented and DirectDraw will call the regular DrawRect function.

Note: The value of dstOfs must be aligned to the boundary specified in the BitmapStartAlign member of the GA_modeInfo structure, and the dstPitch value must be padded to multiples of the BitmapStridePad member of the GA_modeInfo structure.

See Also

DrawRect, DrawRectExt

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com