coriolis/hurricane/doc/viewer/latex/group__graphicsGroup.tex

50 lines
2.8 KiB
TeX

\hypertarget{group__graphicsGroup}{}\doxysection{Graphics}
\label{group__graphicsGroup}\index{Graphics@{Graphics}}
Access to Graphical Resources.
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item
class \mbox{\hyperlink{classHurricane_1_1Graphics}{Hurricane\+::\+Graphics}}
\begin{DoxyCompactList}\small\item\em Manage basic graphical configuration ({\bfseries{API}}) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Access to Graphical Resources.
\hypertarget{group__graphicsGroup_secGraphicsStructure}{}\doxysubsection{General Structure of the Graphics Object}\label{group__graphicsGroup_secGraphicsStructure}
First, the \mbox{\hyperlink{classHurricane_1_1Graphics}{Graphics}} object is a singleton that has to be accessed through the static get\+Graphics methods.
The \mbox{\hyperlink{classHurricane_1_1Graphics}{Graphics}} object contains a set of Display\+Styles of which one is active at a time and so used to do all drawings. Each \mbox{\hyperlink{classHurricane_1_1DisplayStyle}{Display\+Style}} is identified though a name and can be selected with the set\+Style() method.
The \mbox{\hyperlink{classHurricane_1_1DisplayStyle}{Display\+Style}} itself is a set of Drawing\+Style. Each Drawing\+Style is named and provides a QColor, a QPen and a QBrush. QColor, QPen \& QBrush are build from the {\ttfamily }(red,green,blue) , {\ttfamily Border\+Width} and {\ttfamily pattern} .
Direct access to the Drawing\+Style\+: once a \mbox{\hyperlink{classHurricane_1_1DisplayStyle}{Display\+Style}} has been selected, the \mbox{\hyperlink{classHurricane_1_1Graphics}{Graphics}} accessors get\+Color(), get\+Pen() or get\+Brush() gives you access to the Drawing\+Styles.
Minimal \mbox{\hyperlink{classHurricane_1_1DisplayStyle}{Display\+Style}}\+: any \mbox{\hyperlink{classHurricane_1_1DisplayStyle}{Display\+Style}} contains at least the following Drawing\+Styles \+:
\begin{DoxyItemize}
\item {\bfseries{Fallback}} \+: the default Drawing\+Style.
\item {\bfseries{Background}}
\item {\bfseries{Foreground}}
\item {\bfseries{\textbf{ Rubber}}}
\item {\bfseries{Phantom}}
\item {\bfseries{Boundaries}}
\item {\bfseries{Marker}}
\item {\bfseries{Selection\+Draw}}
\item {\bfseries{Selection\+Fill}}
\item {\bfseries{Grid}}
\item {\bfseries{Spot}}
\item {\bfseries{Ghost}}
\item {\bfseries{Text}}
\item {\bfseries{Undef}}
\end{DoxyItemize}
Configuration parsers should create a Drawing\+Style for each \textbf{ Basic\+Layer}, with the name of the \textbf{ Basic\+Layer} as the key. So the following code should be valid \+:
\begin{DoxyCode}{0}
\DoxyCodeLine{QBrush layerBrush = \mbox{\hyperlink{classHurricane_1_1Graphics_ad67a43df460d5c5d5179a81d2a72c9a9}{Graphics::getBrush}} ( layer-\/>getName() );}
\end{DoxyCode}
If no Drawing\+Style of that name is defined, the {\bfseries{Fallback}} will be used.