| Home
| Previous
| Next
| Up

MGL_setPenBitmapPattern

Downloads a new bitmap pattern into the driver.

Declaration

void MGLAPI MGL_setPenBitmapPattern(
int index,
const pattern_t *pat)

Prototype In

mgraph.h

Parameters

index | Index of the bitmap pattern slot to download into
pat | New bitmap pattern to download

Description

This function downloads a new bitmap pattern into the hardware on the graphics device. The MGL supports 8 patterns cached in the driver, allowing you to select one of them to be active at a time using the MGL_usePenBitmapPattern function. Bitmap patterns are used used when rendering patterned primitives in the MGL_BITMAP_TRANSPARENT and MGL_BITMAP_OPQAUE pen styles. A bitmap pattern is defined as an 8 x 8 array of monochrome pixels, stored as an array of 8 bytes.

When filling in the MGL_BITMAP_TRANSPARENT mode, the foreground color is used to fill in all pixels in the bitmap pattern that are a 1. Where the pixels in the bitmap pattern are a 0, the original background color is retained. In the MGL_BITMAP_OPAQUE mode, the background color is used to fill in the pixels in the bitmap that are set to a 0.

Note: After calling MGL_setPenBitmapPattern, the pattern will not become active until after you also call MGL_usePenBitmapPattern. This function only downloads the pattern into the pattern cache, and does not actually select the pattern for use (even if the old selected pattern was the same index).

See Also

MGL_usePenBitmapPattern, MGL_getPenBitmapPattern, MGL_setPenPixmapPattern, MGL_setPenStyle

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