\hypertarget{classACG_1_1ColorTranslator}{}\section{A\+CG\+:\+:Color\+Translator Class Reference}
\label{classACG_1_1ColorTranslator}\index{A\+C\+G\+::\+Color\+Translator@{A\+C\+G\+::\+Color\+Translator}}


{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/\+Color\+Translator.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a27209c01390a19791a2d303462f7f0cf}\label{classACG_1_1ColorTranslator_a27209c01390a19791a2d303462f7f0cf}} 
\hyperlink{classACG_1_1ColorTranslator_a27209c01390a19791a2d303462f7f0cf}{Color\+Translator} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_ae43eba7df1db47dae519199c336cffc1}\label{classACG_1_1ColorTranslator_ae43eba7df1db47dae519199c336cffc1}} 
\hyperlink{classACG_1_1ColorTranslator_ae43eba7df1db47dae519199c336cffc1}{$\sim$\+Color\+Translator} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
void \hyperlink{classACG_1_1ColorTranslator_ab2755899adccf8f82f29dcf569af1562}{initialize} (\hyperlink{classACG_1_1GLState}{A\+C\+G\+::\+G\+L\+State} $\ast$)
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a0e45658233359682cba1e5ee2124a5d4}\label{classACG_1_1ColorTranslator_a0e45658233359682cba1e5ee2124a5d4}} 
bool \hyperlink{classACG_1_1ColorTranslator_a0e45658233359682cba1e5ee2124a5d4}{initialized} () const
\begin{DoxyCompactList}\small\item\em has it been initialized? \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_ace06540dd619dccb6628a28daaa9ad6c}\label{classACG_1_1ColorTranslator_ace06540dd619dccb6628a28daaa9ad6c}} 
\hyperlink{namespaceACG_adb89a8d57b6d179ad535c0880a8b616e}{Vec4uc} \hyperlink{classACG_1_1ColorTranslator_ace06540dd619dccb6628a28daaa9ad6c}{index2color} (const size\+\_\+t \+\_\+idx) const
\begin{DoxyCompactList}\small\item\em index -\/$>$ color (one buffer) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a2832a341466200b3841d4519bdf190cf}\label{classACG_1_1ColorTranslator_a2832a341466200b3841d4519bdf190cf}} 
size\+\_\+t \hyperlink{classACG_1_1ColorTranslator_a2832a341466200b3841d4519bdf190cf}{color2index} (const \hyperlink{namespaceACG_adb89a8d57b6d179ad535c0880a8b616e}{Vec4uc} \+\_\+rgba) const
\begin{DoxyCompactList}\small\item\em color -\/$>$ index (one buffer) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_acb57ac94cf9af3e2833820344c4f832d}\label{classACG_1_1ColorTranslator_acb57ac94cf9af3e2833820344c4f832d}} 
size\+\_\+t \hyperlink{classACG_1_1ColorTranslator_acb57ac94cf9af3e2833820344c4f832d}{max\+\_\+index} () const
\begin{DoxyCompactList}\small\item\em returns maximal convertible index \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_afac22523523f11951573c44b65e937fd}\label{classACG_1_1ColorTranslator_afac22523523f11951573c44b65e937fd}} 
bool {\bfseries initialized\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a51144b3b08d73f48e15fa743514367ff}\label{classACG_1_1ColorTranslator_a51144b3b08d73f48e15fa743514367ff}} 
G\+Lint {\bfseries red\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_af76fdf73c83443ca8f765da018b29453}\label{classACG_1_1ColorTranslator_af76fdf73c83443ca8f765da018b29453}} 
G\+Lint {\bfseries green\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a78f54caa54973fe6b6134d3d76f008fd}\label{classACG_1_1ColorTranslator_a78f54caa54973fe6b6134d3d76f008fd}} 
G\+Lint {\bfseries blue\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a48385bf5c8e1fe1b2c05519f3166d461}\label{classACG_1_1ColorTranslator_a48385bf5c8e1fe1b2c05519f3166d461}} 
G\+Lint {\bfseries alpha\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_ad28cedb113ca5fc838e4222fb39b586b}\label{classACG_1_1ColorTranslator_ad28cedb113ca5fc838e4222fb39b586b}} 
G\+Luint {\bfseries red\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a7dbd8216858a576c493cdc9e04e080d2}\label{classACG_1_1ColorTranslator_a7dbd8216858a576c493cdc9e04e080d2}} 
G\+Luint {\bfseries green\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a512c75e76b86569404e1fa79f8b2211c}\label{classACG_1_1ColorTranslator_a512c75e76b86569404e1fa79f8b2211c}} 
G\+Luint {\bfseries blue\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a2fa52e0032e90d6b7a8541c8d5779512}\label{classACG_1_1ColorTranslator_a2fa52e0032e90d6b7a8541c8d5779512}} 
G\+Luint {\bfseries alpha\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_ade044c809c0d65aba231a98c928776ea}\label{classACG_1_1ColorTranslator_ade044c809c0d65aba231a98c928776ea}} 
G\+Luint {\bfseries red\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_afcaa729500fc3385eee420f140b075db}\label{classACG_1_1ColorTranslator_afcaa729500fc3385eee420f140b075db}} 
G\+Luint {\bfseries green\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a0ee73b462b24feb5f06de96f40383b7d}\label{classACG_1_1ColorTranslator_a0ee73b462b24feb5f06de96f40383b7d}} 
G\+Luint {\bfseries blue\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a786c8ca5d12c483eec3a1e7ad45c7ceb}\label{classACG_1_1ColorTranslator_a786c8ca5d12c483eec3a1e7ad45c7ceb}} 
G\+Luint {\bfseries alpha\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a5eea67d49a85ef1fce8abe4522909074}\label{classACG_1_1ColorTranslator_a5eea67d49a85ef1fce8abe4522909074}} 
G\+Luint {\bfseries red\+\_\+round\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a9b7a182d54ba280bf1285751cbac8099}\label{classACG_1_1ColorTranslator_a9b7a182d54ba280bf1285751cbac8099}} 
G\+Luint {\bfseries green\+\_\+round\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_a934e6fb7a0bf910b9f0ab0acdce3926b}\label{classACG_1_1ColorTranslator_a934e6fb7a0bf910b9f0ab0acdce3926b}} 
G\+Luint {\bfseries blue\+\_\+round\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ColorTranslator_ad0f44a69ebef958b964b76d24ec3778d}\label{classACG_1_1ColorTranslator_ad0f44a69ebef958b964b76d24ec3778d}} 
G\+Luint {\bfseries alpha\+\_\+round\+\_\+}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This class can be used to translate colors to integers. Use this e.\+g. for color index picking, i.\+e. drawing objects using a color corresponding to an unique index. 

Definition at line 75 of file Color\+Translator.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classACG_1_1ColorTranslator_ab2755899adccf8f82f29dcf569af1562}\label{classACG_1_1ColorTranslator_ab2755899adccf8f82f29dcf569af1562}} 
\index{A\+C\+G\+::\+Color\+Translator@{A\+C\+G\+::\+Color\+Translator}!initialize@{initialize}}
\index{initialize@{initialize}!A\+C\+G\+::\+Color\+Translator@{A\+C\+G\+::\+Color\+Translator}}
\subsubsection{\texorpdfstring{initialize()}{initialize()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Color\+Translator\+::initialize (\begin{DoxyParamCaption}\item[{\hyperlink{classACG_1_1GLState}{A\+C\+G\+::\+G\+L\+State} $\ast$}]{\+\_\+state }\end{DoxyParamCaption})}

init (takes current GL context to get the component sizes) Can\textquotesingle{}t use constructor as we might not have a context at this point. 

Definition at line 69 of file Color\+Translator.\+cc.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/Color\+Translator.\+hh\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/Color\+Translator.\+cc\end{DoxyCompactItemize}
