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

49 lines
2.7 KiB
TeX

\hypertarget{group__graphicsGroup}{}\section{Graphics}
\label{group__graphicsGroup}\index{Graphics@{Graphics}}
Access to Graphical Resources.
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item
class \hyperlink{classHurricane_1_1Graphics}{Hurricane\+::\+Graphics}
\begin{DoxyCompactList}\small\item\em Manage basic graphical configuration ({\bfseries A\+PI}) \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection{Detailed Description}
Access to Graphical Resources.
\hypertarget{group__graphicsGroup_secGraphicsStructure}{}\subsection{General Structure of the Graphics Object}\label{group__graphicsGroup_secGraphicsStructure}
First, the \hyperlink{classHurricane_1_1Graphics}{Graphics} object is a singleton that has to be accessed through the static get\+Graphics methods.
The \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 \hyperlink{classHurricane_1_1DisplayStyle}{Display\+Style} is identified though a name and can be selected with the set\+Style() method.
The \hyperlink{classHurricane_1_1DisplayStyle}{Display\+Style} itself is a set of Drawing\+Style. Each Drawing\+Style is named and provides a Q\+Color, a Q\+Pen and a Q\+Brush. Q\+Color, Q\+Pen \& Q\+Brush are build from the {\ttfamily }(red,green,blue) , {\ttfamily Border\+Width} and {\ttfamily pattern} .
Direct access to the Drawing\+Style\+: once a \hyperlink{classHurricane_1_1DisplayStyle}{Display\+Style} has been selected, the \hyperlink{classHurricane_1_1Graphics}{Graphics} accessors get\+Color(), get\+Pen() or get\+Brush() gives you access to the Drawing\+Styles.
Minimal \hyperlink{classHurricane_1_1DisplayStyle}{Display\+Style}\+: any \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}
QBrush layerBrush = \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.