Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Friends
IlvColorPattern Class Reference

Resource class. More...

#include <ilviews/base/port.h>

Inheritance diagram for IlvColorPattern:
IlvPattern IlvResource

Public Member Functions

 IlvColorPattern (IlvBitmap *bitmap)
 Constructor. More...
 
 IlvColorPattern (IlvDisplay *display, IlvDim w, IlvDim h, IlUShort depth, unsigned char *data)
 Constructor. More...
 
IlUShort depth () const
 Retrieves the depth (number of bits that define a pixel value) of this pattern. More...
 
- Public Member Functions inherited from IlvPattern
 IlvPattern (IlvBitmap *bitmap)
 Constructor. More...
 
 IlvPattern (IlvDisplay *display, IlvDim width, IlvDim height, unsigned char *data)
 Constructor. More...
 
unsigned char * getBitmapData (IlUInt &size) const
 Retrieves the pixels of this pattern. More...
 
IlvDim height () const
 Retrieves the height of this pattern. More...
 
void putBitmapData (unsigned char *data, IlUInt size)
 Modifies the pixels of this pattern. More...
 
IlvDim width () const
 Retrieves the width of this pattern. More...
 
- Public Member Functions inherited from IlvResource
IlvDisplaygetDisplay () const
 Gets the IlvDisplay instance. More...
 
const char * getName () const
 Gets the resource name. More...
 
void lock ()
 Locks the resource. More...
 
virtual void setName (const char *name)
 Sets the name of the resource. More...
 
virtual void unLock ()
 Unlocks the resource. More...
 

Friends

class IlvDisplay
 

Detailed Description

Resource class.

Library: xviews or winviews or mviews (mutually exclusive)

Defines a color pattern. This can be used in a filling operation when a colored fill pattern is desired.

See also
IlvPalette, IlvDisplay::defaultPattern, IlvDisplay::getColorPattern.

Constructor & Destructor Documentation

◆ IlvColorPattern() [1/2]

IlvColorPattern::IlvColorPattern ( IlvDisplay display,
IlvDim  w,
IlvDim  h,
IlUShort  depth,
unsigned char *  data 
)

Constructor.

This constructor initializes a new IlvColorPattern object with a bitmap that is defined by the indicated data.

Parameters
displayThe display where this color pattern is defined.
wThe width of this color pattern.
hThe height of this color pattern.
depthThe depth of this color pattern.
dataThe data that defines this color pattern. This data must be 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.

◆ IlvColorPattern() [2/2]

IlvColorPattern::IlvColorPattern ( IlvBitmap bitmap)

Constructor.

This constructor initializes a new IlvColorPattern object with a pre-allocated bitmap.

Parameters
bitmapThe bitmap that defines this color pattern. This bitmap is internally copied (it is therefore not locked).

Member Function Documentation

◆ depth()

IlUShort IlvColorPattern::depth ( ) const
virtual

Retrieves the depth (number of bits that define a pixel value) of this pattern.

Returns
The depth of this pattern. This value is always 1 for instances of IlvPattern, but this member function can return a different value for an instance of IlvColorPattern, which is a subclass of IlvPattern.

Reimplemented from IlvPattern.