\hypertarget{a07280}{}\section{A\+CG\+:\+:Color\+Translator Class Reference}
\label{a07280}\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{a07280_a27209c01390a19791a2d303462f7f0cf}\label{a07280_a27209c01390a19791a2d303462f7f0cf}} 
\hyperlink{a07280_a27209c01390a19791a2d303462f7f0cf}{Color\+Translator} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07280_ae43eba7df1db47dae519199c336cffc1}\label{a07280_ae43eba7df1db47dae519199c336cffc1}} 
\hyperlink{a07280_ae43eba7df1db47dae519199c336cffc1}{$\sim$\+Color\+Translator} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
void \hyperlink{a07280_ab2755899adccf8f82f29dcf569af1562}{initialize} (\hyperlink{a07452}{A\+C\+G\+::\+G\+L\+State} $\ast$)
\item 
\mbox{\Hypertarget{a07280_a0e45658233359682cba1e5ee2124a5d4}\label{a07280_a0e45658233359682cba1e5ee2124a5d4}} 
bool \hyperlink{a07280_a0e45658233359682cba1e5ee2124a5d4}{initialized} () const
\begin{DoxyCompactList}\small\item\em has it been initialized? \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07280_ace06540dd619dccb6628a28daaa9ad6c}\label{a07280_ace06540dd619dccb6628a28daaa9ad6c}} 
\hyperlink{a06176_adb89a8d57b6d179ad535c0880a8b616e}{Vec4uc} \hyperlink{a07280_ace06540dd619dccb6628a28daaa9ad6c}{index2color} (const size\+\_\+t \+\_\+idx) const
\begin{DoxyCompactList}\small\item\em index -\/$>$ color (one buffer) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07280_a2832a341466200b3841d4519bdf190cf}\label{a07280_a2832a341466200b3841d4519bdf190cf}} 
size\+\_\+t \hyperlink{a07280_a2832a341466200b3841d4519bdf190cf}{color2index} (const \hyperlink{a06176_adb89a8d57b6d179ad535c0880a8b616e}{Vec4uc} \+\_\+rgba) const
\begin{DoxyCompactList}\small\item\em color -\/$>$ index (one buffer) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07280_acb57ac94cf9af3e2833820344c4f832d}\label{a07280_acb57ac94cf9af3e2833820344c4f832d}} 
size\+\_\+t \hyperlink{a07280_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{a07280_afac22523523f11951573c44b65e937fd}\label{a07280_afac22523523f11951573c44b65e937fd}} 
bool {\bfseries initialized\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a51144b3b08d73f48e15fa743514367ff}\label{a07280_a51144b3b08d73f48e15fa743514367ff}} 
G\+Lint {\bfseries red\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{a07280_af76fdf73c83443ca8f765da018b29453}\label{a07280_af76fdf73c83443ca8f765da018b29453}} 
G\+Lint {\bfseries green\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a78f54caa54973fe6b6134d3d76f008fd}\label{a07280_a78f54caa54973fe6b6134d3d76f008fd}} 
G\+Lint {\bfseries blue\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a48385bf5c8e1fe1b2c05519f3166d461}\label{a07280_a48385bf5c8e1fe1b2c05519f3166d461}} 
G\+Lint {\bfseries alpha\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{a07280_ad28cedb113ca5fc838e4222fb39b586b}\label{a07280_ad28cedb113ca5fc838e4222fb39b586b}} 
G\+Luint {\bfseries red\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a7dbd8216858a576c493cdc9e04e080d2}\label{a07280_a7dbd8216858a576c493cdc9e04e080d2}} 
G\+Luint {\bfseries green\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a512c75e76b86569404e1fa79f8b2211c}\label{a07280_a512c75e76b86569404e1fa79f8b2211c}} 
G\+Luint {\bfseries blue\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a2fa52e0032e90d6b7a8541c8d5779512}\label{a07280_a2fa52e0032e90d6b7a8541c8d5779512}} 
G\+Luint {\bfseries alpha\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{a07280_ade044c809c0d65aba231a98c928776ea}\label{a07280_ade044c809c0d65aba231a98c928776ea}} 
G\+Luint {\bfseries red\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{a07280_afcaa729500fc3385eee420f140b075db}\label{a07280_afcaa729500fc3385eee420f140b075db}} 
G\+Luint {\bfseries green\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a0ee73b462b24feb5f06de96f40383b7d}\label{a07280_a0ee73b462b24feb5f06de96f40383b7d}} 
G\+Luint {\bfseries blue\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a786c8ca5d12c483eec3a1e7ad45c7ceb}\label{a07280_a786c8ca5d12c483eec3a1e7ad45c7ceb}} 
G\+Luint {\bfseries alpha\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a5eea67d49a85ef1fce8abe4522909074}\label{a07280_a5eea67d49a85ef1fce8abe4522909074}} 
G\+Luint {\bfseries red\+\_\+round\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a9b7a182d54ba280bf1285751cbac8099}\label{a07280_a9b7a182d54ba280bf1285751cbac8099}} 
G\+Luint {\bfseries green\+\_\+round\+\_\+}
\item 
\mbox{\Hypertarget{a07280_a934e6fb7a0bf910b9f0ab0acdce3926b}\label{a07280_a934e6fb7a0bf910b9f0ab0acdce3926b}} 
G\+Luint {\bfseries blue\+\_\+round\+\_\+}
\item 
\mbox{\Hypertarget{a07280_ad0f44a69ebef958b964b76d24ec3778d}\label{a07280_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{a07280_ab2755899adccf8f82f29dcf569af1562}\label{a07280_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{a07452}{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}
