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>
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
- Low color resolution which allows us to use 16 predefined pure
colors for drawing lines and unlimited number of dithered colors
for window's background, solid filled areas etc. Here Graphic Device
will approximate requested colors by existing ones for line colors
( really this approximation is doing by Windows ). A dithering
technique will be used for window's backgrounds, solid fills etc.
( this is doing by WIndows also ). A dithering techique will be use
for solid fill.
- Medium color resolution which requires a Windows palette manager.
This mode takes after X window system's PseudoColor Visual. The
application can create a LOGICAL PALETTE to represent 20 reserved
by Windows colors and 236 programmable ones. It's possible to reserve
odd entries in the palette for highlighting purposes ( but real
technique is not the same as in X window system - see Windows manual ).
It's possible to create several logical palettes. To do it create
other GraphicDevice but in this case color "flicking" is possible.
- High color resolution. Here 65 536 or 16 777 216 colors are available.
Any color we like will be exactly displayed on the screen, but
highlighting technique is not available. This mode often called
TrueColor but it's not the same as X window TrueColor.
A Graphic Device also defines physical dimensions of the screen.
Constructor & Destructor Documentation
Member Function Documentation
Field Documentation
The documentation for this class was generated from the following file: