# Hurricane Design Viewer

Classes
Graphics

Access to Graphical Resources. More...

## Classes
class | Hurricane::Graphics
| Manage basic graphical configuration (API) More...

## Detailed Description

Access to Graphical Resources.

# General Structure of the Graphics Object

First, the Graphics object is a singleton that has to be accessed through the static getGraphics methods.

The Graphics object contains a set of DisplayStyles of which one is active at a time and so used to do all drawings. Each DisplayStyle is identified though a name and can be selected with the setStyle() method.

The DisplayStyle itself is a set of DrawingStyle. Each DrawingStyle is named and provides a QColor, a QPen and a QBrush. QColor, QPen & QBrush are build from the ``(red,green,blue) , `BorderWidth` and `pattern` .

Direct access to the DrawingStyle: once a DisplayStyle has been selected, the Graphics accessors getColor(), getPen() or getBrush() gives you access to the DrawingStyles.

Minimal DisplayStyle: any DisplayStyle contains at least the following DrawingStyles :

- Fallback : the default DrawingStyle.
- Background
- Foreground
- Rubber
- Phantom
- Boundaries
- Marker
- SelectionDraw
- SelectionFill
- Grid
- Spot
- Ghost
- Text
- Undef

Configuration parsers should create a DrawingStyle for each BasicLayer, with the name of the BasicLayer as the key. So the following code should be valid :

QBrush layerBrush = Graphics::getBrush ( layer->getName() );

If no DrawingStyle of that name is defined, the Fallback will be used.

Generated by doxygen 1.8.14 on Tue Jul 21 2020 | Return to top of page

Hurricane Design Viewer | Copyright © 2008-2016 UPMC All rights reserved