|
|
|
|
Set8x8ColorPattern
Download an 8x8 color pattern to the driver.
Declaration
void NAPI GA_2DStateFuncs::Set8x8ColorPattern(
N_int32 index,
GA_colorPattern *pattern)
Prototype In
snap/graphics.h
Parameters
index |
Index of the pattern to download |
pattern |
Pointer to pattern data to download |
Description
This downloads one of 8, 8x8 color patterns for all subsequent color pattern filled functions. The 8x8 color fill pattern is used for rectangle and scanline filling, where the pattern is X and Y coordinate aligned with the left edge and top edge of the display. Thus the colors in the pattern that applies to a specific pixel in the scanline is determine by the pixel's X starting at the left. Hence pixel 0 corresponds to color 0, pixel 1 = color 1 etc. It is the responsibility of the calling application to rotate the pattern before calling this routine if it is desired that the pattern be aligned to a different starting coordinate (such as with Windows Bitmaps and setting the bitmap origin). The color pattern is represented as an 8x8 array of packed pixel data. In 8bpp modes there is 8 bytes per line, for 16bpp modes there are 16bytes per line, for 24bpp modes there are 24bytes per line and for 32bpp modes there are 32 bytes per line. Hence the size of the pattern data is different depending on the color depth currently active. Each pixel color value is packed for the appropriate display mode.
Note: 8 cached patterns are supported because some hardware supports caching multiple patterns in offscreen video memory for maximum performance. In cases where the hardware only supports a single hardware pattern, the driver is responsible for caching the pattern data internally and downloading it as efficiently as possible to the display hardware.
See Also
Set8x8MonoPattern, Use8x8MonoPattern, Use8x8ColorPattern, GA_2DRenderFuncs::DrawColorPattScan, DrawColorPattScanList, DrawColorPattRect, DrawColorPattTrap
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com