Foundation > Graphic Resources > IlvPattern and IlvColorPattern: The Pattern Classes
 
IlvPattern and IlvColorPattern: The Pattern Classes
A pattern can be of any size and either monochrome, defined with only one bit per pixel, or colored. For details see:
*Monochrome Patterns
*Colored Patterns
Monochrome Patterns
Monochrome patterns are handled by the IlvPattern class. Two constructors are provided that you can use depending on the data available:
IlvPattern(IlvDisplay* display,
IlvDim w,
IlvDim h,
unsigned char* data);
IlvPattern(IlvBitmap* bitmap);
The first constructor initializes a new IlvPattern object with a pattern w pixels wide and h pixels high, filled in by the data stored in the data array of bit values. The pixel values are packed into 16-bit words from left to right in a most-significant-bits-first manner, and each scan line, stored from top to bottom, must be padded to 16 bits.
The second constructor initializes a new IlvPattern object from the given bitmap monochrome image.
To obtain a previously defined pattern, use the member function IlvDisplay::getPattern.
Other patterns are predefined within Rogue Wave® Views, which you can access by name.
Predefined Pattern Resources
Colored Patterns
Patterns can also be colored and are represented by instances of the IlvColorPattern class.

Version 6.2.1
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.