Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
WNT_GraphicDevice Class Reference

This class defines Windows NT display device.
A Graphic Device defines color management. Windows can run in three
different color modes depending of the installed graphic board:
More...

#include <WNT_GraphicDevice.hxx>

Inheritance diagram for WNT_GraphicDevice:
Inheritance graph
[legend]

Public Member Functions

 WNT_GraphicDevice (const Standard_Boolean aColorCube=Standard_False, const Aspect_Handle aDevContext=0)
 Creates a GraphicDevice and logical palette.
Builds an OpenGL colorcube on that palette depending
of the aColorCube flag and hardware.
Warning: Raises if createion of the logical palette failed.

 WNT_GraphicDevice (const Standard_Boolean aColorCube, const Standard_Integer aDevContext)
 same as previous one (to provide access form CCL)

virtual void Destroy ()
 Destroies all ressources attached to the GraphicDevice.

 ~WNT_GraphicDevice ()
WNT_ColorRef SetColor (const Quantity_Color &aColor, const Standard_Boolean aHighlight=Standard_False)
 Returns the color value in form specific to Windows NT.
Sets the color values in the logical palette if the
hardware supports it. If in this case there are not
free cell in the logical palette then this method will
search for nearest color in the palette.
If <aHighlight> is True then sets a highlight color.

virtual WNT_ColorRef SetColor (const Standard_Integer aRed, const Standard_Integer aGreen, const Standard_Integer aBlue, const Standard_Boolean aHighlight=Standard_False)
 See above

virtual void SetColor (const WNT_Long &aPixel)
 Color allocation for images.

void MapColors (const Handle< Aspect_ColorMap > &aColorMap, Handle< WNT_HColorTable > &aColorTable)
 Returns the color value in form specific to WIndows NT
in the <aColorTable>. See SetColor method.
Warning: The dimensions and index ranges of the <aColorMap> and
<aColorTable> must be the same;

Aspect_Handle HPalette () const
 Returns logical palette handle attached to the
GraphicDevice.

void DisplaySize (Standard_Integer &aWidth, Standard_Integer &aHeight) const
 Returns the Display size in PIXEL

void DisplaySize (Quantity_Length &aWidth, Quantity_Length &aHeight) const
 Returns the Display size in working units units

Standard_Boolean IsPaletteDevice () const
 Returns True if hardware is palette-compatible.

Standard_Integer NumColors () const
 Returns number of available colors.

WNT_ColorRef HighlightColor () const
 Returns highlight color.

virtual Handle_Aspect_GraphicDriver GraphicDriver () const
 Dummy method

Protected Member Functions

void Init (const Standard_Boolean aColorCube, const Aspect_Handle aDevContext)

Protected Attributes

Quantity_Length myMWidth
Quantity_Length myMHeight
Standard_Integer myWidth
Standard_Integer myHeight
Standard_Integer myNumColors
Standard_Integer myFreeIndex
Aspect_Handle myPalette
Standard_Address myLogPal
WNT_ColorRef myHighlightColor
Standard_Boolean myOpenGLPalette

Detailed Description


Constructor & Destructor Documentation


Member Function Documentation

virtual void WNT_GraphicDevice::Destroy ( ) [virtual]

Reimplemented in Graphic3d_WNTGraphicDevice.

virtual Handle_Aspect_GraphicDriver WNT_GraphicDevice::GraphicDriver ( ) const [virtual]

Implements Aspect_GraphicDevice.

Reimplemented in Graphic3d_WNTGraphicDevice.

void WNT_GraphicDevice::Init ( const Standard_Boolean  aColorCube,
const Aspect_Handle  aDevContext 
) [protected]
virtual void WNT_GraphicDevice::SetColor ( const WNT_Long aPixel) [virtual]

Field Documentation


The documentation for this class was generated from the following file: