Functions
Color Maps

Functions

UInt32mdlColor_matchLongColorMap (UInt32 *pUserMap, byte *pColorTable, int screen, bool exactColorsEnabled)
 Generate a color map in cmap. More...
 
int mdlColor_getColorMap (UInt32 *pColormap, int *pNumMappings, int screen, int maxSize)
 Obtain an existing colormap for the master design file's colortable. More...
 
int mdlColor_assignColorMap (int screen, UInt32 *pColorMap, DgnModelRefP modelRef)
 This function is no longer used. More...
 

Detailed Description

Function Documentation

int mdlColor_assignColorMap ( int  screen,
UInt32 pColorMap,
DgnModelRefP  modelRef 
)

This function is no longer used.

Parameters
[in]screenThe index of the screen (if needed).
[in]pColorMapAn array of unsigned long values for colormap information.
[in]modelRefThe model to get the color descriptor from.
Returns
MDLERR_NOTAVAILABLE.
See also
mdlColor_matchLongColorMap mdlColor_getColorMap
Remarks
Required Library: mdlbltin.lib
int mdlColor_getColorMap ( UInt32 pColormap,
int *  pNumMappings,
int  screen,
int  maxSize 
)

Obtain an existing colormap for the master design file's colortable.

A colormap is an array of draw values corresponding to each RGB triad in the colortable. A colortable has a colormap for each screen in the system.

Parameters
[out]pColormapMust point to an array of unsigned long values to receive all or part of the system colormap information.
[in]pNumMappingsPoints to an integer where the number of entries in the system colormap are stored. If numMappings is NULL, it is ignored.
[in]screenIndicates for which screen the colormap is to be obtained.
[in]maxSizeSpecifies how many entries from the system colormap are to be copied to colormapP.
Returns
SUCCESS or MDLERR_BADARG if colormapP is NULL.
See also
mdlColor_assignColorMap
Remarks
Required Library: mdlbltin.lib
UInt32* mdlColor_matchLongColorMap ( UInt32 pUserMap,
byte pColorTable,
int  screen,
bool  exactColorsEnabled 
)

Generate a color map in cmap.

cmap contains the Color Manager display color draw values corresponding to each RGB color definition in ctbl.

Remarks
The only difference between mdlColor_matchColorMap and mdlColor_matchLongColorMap is in the size of the color map elements they generate. mdlColor_matchColorMap generates a color map array of bytes. In this case, the byte values are always indices into a hardware color palette. mdlColor_matchLongColorMap generates an array of unsigned long values that can be either indices into a hardware color palette or other "draw values" that are specific to the host windowing system. For example, under Windows NT, each color map entry would be equivalent to a COLORREF specification.
With the advent of color descriptors and color palettes in MicroStation 5.0, the need for generating and manipulating color maps directly is greatly reduced if not eliminated. Furthermore, mdlColor_matchColorMap is not available on all platforms. It is only supported for backwards compatibility to the platforms supported by MicroStation 4.x. If color maps must be used, mdlColor_matchLongColorMap is the preferred function for generating them.
Parameters
[out]pUserMapIs an array of 256 elements (bytes or unsigned longs) to receive the matched color indices.
[in]pColorTableIs a 768-byte color table (256 RGB specifications) to be matched against the Color Manager's display colors.
[in]screenIndicates the right (0) or left (1) screen.
[in]exactColorsEnabledCurrently ignored.
Returns
No return value.
See also
mdlColor_convertRGBtoIndex
Remarks
Required Library: mdlbltin.lib

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.