#include <Xw_ColorMap.hxx>
Public Member Functions | |
Standard_EXPORT | Xw_ColorMap (const Standard_CString Connexion, const Xw_TypeOfVisual Visual=Xw_TOV_PREFERRED_PSEUDOCOLOR, const Xw_TypeOfMapping Mapping=Xw_TOM_COLORCUBE, const Standard_Integer Ncolors=0, const Standard_Boolean UseDefault=Standard_True) |
Creates a generic ColorMap with a maximum of unallocated ColorMapEntry. Sets this colormap with the best colorcube in the Default HardWare Colormap. . | |
virtual Standard_EXPORT void | SetEntry (const Standard_Integer Index, const Standard_Real Red, const Standard_Real Green, const Standard_Real Blue) |
Modifies an entry in the color map <me>. //! Warning if Index is < 0 or >= MaxColors() or ColorMap is not defined properly . | |
virtual Standard_EXPORT void | SetEntry (const Aspect_ColorMapEntry &Entry) |
Modifies an entry in the color map <me>. //! Warning if ColorMap size is exceeded. or ColorMap is not defined properly or ColorMapEntry Index is out of range according to the supported hardware, or the Mapping type of this colormap is READ_ONLY. . | |
virtual Standard_EXPORT void | SetEntries (const Handle(Aspect_ColorMap)&Colormap) |
Modifies all Entries from the new colormap //! Warning if ColorMap size is exceeded. or ColorMap is not defined properly or One of the new ColorMapEntry Index is out of range according to the supported hardware . | |
virtual Standard_EXPORT void | SetHighlightColor (const Quantity_Color &aColor) |
Sets the Highlight Color for all Windows which use it . Error if Colormap is not defined properly . | |
virtual Standard_EXPORT void | Destroy () |
Destroies the Colormap . | |
~Xw_ColorMap () | |
virtual Standard_EXPORT Quantity_Color | HighlightColor () const |
Returns the highlight color . . | |
virtual Standard_EXPORT Standard_Integer | PixelOfColor (const Quantity_Color &aColor) const |
Returns a pixel value of an RGB color given as Quantity_Color, depending of the HardWare and Visual class. . | |
virtual Standard_EXPORT Standard_Integer | AllocatesPixelOfColor () const |
Returns an allocated pixel of color writable by using the method SetColorOfPixel(..) or -1 if no more pixel must be allocated. Warning: this call take has an effect in PseudoColor model only. . | |
Standard_EXPORT void | FreePixelOfColor (const Standard_Integer aPixel) const |
Free an allocated pixel of color Warning: this call take has an effect in PseudoColor model only. . | |
virtual Standard_EXPORT Standard_Boolean | SetColorOfPixel (const Standard_Integer aPixel, const Quantity_Color &aColor) const |
Returns TRUE if the allocated pixel <apixel> has been updated correctly with the color <acolor> . | |
virtual Standard_EXPORT Standard_Integer | Entry (const Standard_Integer Index, Standard_Real &Red, Standard_Real &Green, Standard_Real &Blue) const |
Returns a pixel value and the components of the corresponding color index. . | |
virtual Standard_EXPORT Standard_Integer | HighlightPixel () const |
Returns the current HighLight pixel value , depending of the HardWare and Visual class . | |
Standard_EXPORT Standard_Integer | MaxColors () const |
Returns the number of available colors in the colormap. or 0 if the colormap is not enabled. . | |
Standard_EXPORT Standard_Integer | MaxOverlayColors () const |
Returns the number of available colors in the associated overlay colormap if any. or 0 if the overlay colormap is not enabled. . | |
Standard_EXPORT Aspect_Handle | XColorMap () const |
Returns the Colormap XId of the Colormap depending of the HardWare and Visual class . | |
Standard_EXPORT Standard_Boolean | XColorCube (Aspect_Handle &ColormapID, Standard_Integer &VisualID, Standard_Integer &BasePixel, Standard_Integer &RedMax, Standard_Integer &RedMult, Standard_Integer &GreenMax, Standard_Integer &GreenMult, Standard_Integer &BlueMax, Standard_Integer &BlueMult) const |
Returns TRUE and the color-cube definition of the colormap depending of the HardWare and Visual class or returns FALSE if the colormap dont't have a color-cube defined. Color computation from the colorcube : colorindex = BasePixel + r*RedMax*RedMult + g*GreenMax*GreenMult + b*BlueMax*BlueMult where r,g,b are the red,green,blue components of the color in the range [0.,1.] . | |
Standard_EXPORT Standard_Boolean | XGrayRamp (Aspect_Handle &ColormapID, Standard_Integer &VisualID, Standard_Integer &BasePixel, Standard_Integer &GrayMax, Standard_Integer &GrayMult) const |
Returns TRUE and the gray-ramp definition of the colormap depending of the HardWare and Visual class or returns FALSE if the colormap dont't have a gray-ramp defined. Color computation from the grayramp : colorindex = BasePixel + g*GrayMax*GrayMult where g is the gray intensity of the color in the range [0.,1.] . | |
Standard_EXPORT Aspect_Handle | XOverlayColorMap () const |
Returns the Colormap XId of the associated Overlay Colormap depending of the HardWare and Visual class . | |
Standard_EXPORT Standard_Address | XVisual () const |
Returns the Visual address of the Colormap depending of the HardWare . | |
Standard_EXPORT Standard_Address | XOverlayVisual () const |
Returns the Visual address of the associated Overlay Colormap depending of the HardWare . | |
Standard_EXPORT Xw_TypeOfVisual | VisualClass () const |
Returns the Visual Class of the Colormap depending of the HardWare . | |
Standard_EXPORT Xw_TypeOfVisual | OverlayVisualClass () const |
Returns the Visual Class of the associated Overlay Colormap depending of the HardWare . | |
Standard_EXPORT Standard_Integer | VisualID () const |
Returns the Visual ID of the Colormap depending of the HardWare . | |
Standard_EXPORT Standard_Integer | OverlayVisualID () const |
Returns the Visual ID of the associated Overlay Colormap depending of the HardWare . | |
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const |
Protected Member Functions | |
Standard_EXPORT | Xw_ColorMap () |
Standard_EXPORT Standard_Address | ExtendedColorMap () const |
Returns extended data colormap structure pointer. . | |
Standard_EXPORT Standard_Address | ExtendedOverlayColorMap () const |
Returns extended data overlay colormap structure pointer. . | |
Static Protected Member Functions | |
static Standard_EXPORT void | PrintError () |
Print last error or raise depending of the error gravity. . | |
Private Attributes | |
Standard_Address | MyExtendedDisplay |
Standard_Address | MyExtendedColorMap |
Standard_Address | MyExtendedOverlayColorMap |
Xw_TypeOfMapping | MyMapping |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|