\hypertarget{group__Edje__Perspective}{\section{Edje Perspective}
\label{group__Edje__Perspective}\index{Edje Perspective@{Edje Perspective}}
}


Functions that deal with 3\+D projection of an 2\+D object.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Edje__Perspective_gaa34f2bebed885cea3d891858ad7c2e2b}{typedef struct \+\_\+\+Edje\+\_\+\+Perspective {\bfseries Edje\+\_\+\+Perspective}}\label{group__Edje__Perspective_gaa34f2bebed885cea3d891858ad7c2e2b}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
Edje\+\_\+\+Perspective $\ast$ \hyperlink{group__Edje__Perspective_ga4ce415ab5a9f53ba55d921ab5c48a2f4}{edje\+\_\+perspective\+\_\+new} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e)
\begin{DoxyCompactList}\small\item\em Creates a new perspective in the given canvas. \end{DoxyCompactList}\item 
void \hyperlink{group__Edje__Perspective_ga51e6fa1a3a019919834770e78a39865d}{edje\+\_\+perspective\+\_\+free} (Edje\+\_\+\+Perspective $\ast$ps)
\begin{DoxyCompactList}\small\item\em Delete the given perspective object. \end{DoxyCompactList}\item 
void \hyperlink{group__Edje__Perspective_gaeee5dfe8b3f428583e4f8a846f0b0d15}{edje\+\_\+perspective\+\_\+set} (Edje\+\_\+\+Perspective $\ast$ps, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} px, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} py, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} z0, \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord} foc)
\begin{DoxyCompactList}\small\item\em Setup the transform for this perspective object. \end{DoxyCompactList}\item 
void \hyperlink{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}{edje\+\_\+perspective\+\_\+global\+\_\+set} (Edje\+\_\+\+Perspective $\ast$ps, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} global)
\begin{DoxyCompactList}\small\item\em Make this perspective object be global for its canvas. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Edje__Perspective_ga3dd9d197daf58ae5d4e4d37b2a05f6ee}{edje\+\_\+perspective\+\_\+global\+\_\+get} (const Edje\+\_\+\+Perspective $\ast$ps)
\begin{DoxyCompactList}\small\item\em Get whether the given perspective object is global or not. \end{DoxyCompactList}\item 
const Edje\+\_\+\+Perspective $\ast$ \hyperlink{group__Edje__Perspective_ga12deee9aee68c698cbefa3581ccb268c}{edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get} (const \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e)
\begin{DoxyCompactList}\small\item\em Get the global perspective object set for this canvas. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Functions that deal with 3\+D projection of an 2\+D object. 

Perspective is a graphical tool that makes objets represented in 2\+D look like they have a 3\+D appearance.

Edje allows us to use perspective on any edje object. This group of functions deal with the use of perspective, by creating and configuring a perspective object that must set to a edje object or a canvas, affecting all the objects inside that have no particular perspective set already. 

\subsection{Function Documentation}
\hypertarget{group__Edje__Perspective_ga4ce415ab5a9f53ba55d921ab5c48a2f4}{\index{Edje Perspective@{Edje Perspective}!edje\+\_\+perspective\+\_\+new@{edje\+\_\+perspective\+\_\+new}}
\index{edje\+\_\+perspective\+\_\+new@{edje\+\_\+perspective\+\_\+new}!Edje Perspective@{Edje Perspective}}
\subsubsection[{edje\+\_\+perspective\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}Edje\+\_\+\+Perspective$\ast$ edje\+\_\+perspective\+\_\+new (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{e}
\end{DoxyParamCaption}
)}}\label{group__Edje__Perspective_ga4ce415ab5a9f53ba55d921ab5c48a2f4}


Creates a new perspective in the given canvas. 


\begin{DoxyParams}{Parameters}
{\em e} & The given canvas (Evas). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An \hyperlink{group__Edje__Perspective}{Edje Perspective} object for this canvas, or {\ttfamily N\+U\+L\+L} on errors.
\end{DoxyReturn}
This function creates a perspective object that can be set on an Edje object, or globally to all Edje objects on this canvas.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Edje__Perspective_gaeee5dfe8b3f428583e4f8a846f0b0d15}{edje\+\_\+perspective\+\_\+set()} 

\hyperlink{group__Edje__Perspective_ga51e6fa1a3a019919834770e78a39865d}{edje\+\_\+perspective\+\_\+free()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{edje-perspective_8c-example}{edje-\/perspective.\+c}.\end{Desc}


References E\+V\+A\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+D\+E\+L, evas\+\_\+object\+\_\+data\+\_\+set(), evas\+\_\+object\+\_\+event\+\_\+callback\+\_\+add(), and evas\+\_\+object\+\_\+rectangle\+\_\+add().

\hypertarget{group__Edje__Perspective_ga51e6fa1a3a019919834770e78a39865d}{\index{Edje Perspective@{Edje Perspective}!edje\+\_\+perspective\+\_\+free@{edje\+\_\+perspective\+\_\+free}}
\index{edje\+\_\+perspective\+\_\+free@{edje\+\_\+perspective\+\_\+free}!Edje Perspective@{Edje Perspective}}
\subsubsection[{edje\+\_\+perspective\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}void edje\+\_\+perspective\+\_\+free (
\begin{DoxyParamCaption}
\item[{Edje\+\_\+\+Perspective $\ast$}]{ps}
\end{DoxyParamCaption}
)}}\label{group__Edje__Perspective_ga51e6fa1a3a019919834770e78a39865d}


Delete the given perspective object. 


\begin{DoxyParams}{Parameters}
{\em ps} & A valid perspective object, or {\ttfamily N\+U\+L\+L}.\\
\hline
\end{DoxyParams}
This function will delete the perspective object. If the perspective effect was being applied to any Edje object or part, this effect won't be applied anymore.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Edje__Perspective_ga4ce415ab5a9f53ba55d921ab5c48a2f4}{edje\+\_\+perspective\+\_\+new()} 
\end{DoxySeeAlso}


References evas\+\_\+object\+\_\+del().

\hypertarget{group__Edje__Perspective_gaeee5dfe8b3f428583e4f8a846f0b0d15}{\index{Edje Perspective@{Edje Perspective}!edje\+\_\+perspective\+\_\+set@{edje\+\_\+perspective\+\_\+set}}
\index{edje\+\_\+perspective\+\_\+set@{edje\+\_\+perspective\+\_\+set}!Edje Perspective@{Edje Perspective}}
\subsubsection[{edje\+\_\+perspective\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}void edje\+\_\+perspective\+\_\+set (
\begin{DoxyParamCaption}
\item[{Edje\+\_\+\+Perspective $\ast$}]{ps, }
\item[{{\bf Evas\+\_\+\+Coord}}]{px, }
\item[{{\bf Evas\+\_\+\+Coord}}]{py, }
\item[{{\bf Evas\+\_\+\+Coord}}]{z0, }
\item[{{\bf Evas\+\_\+\+Coord}}]{foc}
\end{DoxyParamCaption}
)}}\label{group__Edje__Perspective_gaeee5dfe8b3f428583e4f8a846f0b0d15}


Setup the transform for this perspective object. 

This sets the parameters of the perspective transformation. X, Y and Z values are used. The px and py points specify the \char`\"{}infinite distance\char`\"{} point in the 3\+D conversion (where all lines converge to like when artists draw 3\+D by hand). The {\ttfamily z0} value specifies the z value at which there is a 1\+:1 mapping between spatial coordinates and screen coordinates. Any points on this z value will not have their X and Y values modified in the transform. Those further away (Z value higher) will shrink into the distance, and those less than this value will expand and become bigger. The {\ttfamily foc} value determines the \char`\"{}focal length\char`\"{} of the camera. This is in reality the distance between the camera lens plane itself (at or closer than this rendering results are undefined) and the \char`\"{}z0\char`\"{} z value. This allows for some \char`\"{}depth\char`\"{} control and {\ttfamily foc} must be greater than 0.


\begin{DoxyParams}{Parameters}
{\em ps} & The perspective object \\
\hline
{\em px} & The perspective distance X coordinate \\
\hline
{\em py} & The perspective distance Y coordinate \\
\hline
{\em z0} & The \char`\"{}0\char`\"{} z plane value \\
\hline
{\em foc} & The focal distance \\
\hline
\end{DoxyParams}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{edje-perspective_8c-example}{edje-\/perspective.\+c}.\end{Desc}


References E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H, and E\+I\+N\+A\+\_\+\+T\+R\+U\+E.

\hypertarget{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}{\index{Edje Perspective@{Edje Perspective}!edje\+\_\+perspective\+\_\+global\+\_\+set@{edje\+\_\+perspective\+\_\+global\+\_\+set}}
\index{edje\+\_\+perspective\+\_\+global\+\_\+set@{edje\+\_\+perspective\+\_\+global\+\_\+set}!Edje Perspective@{Edje Perspective}}
\subsubsection[{edje\+\_\+perspective\+\_\+global\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}void edje\+\_\+perspective\+\_\+global\+\_\+set (
\begin{DoxyParamCaption}
\item[{Edje\+\_\+\+Perspective $\ast$}]{ps, }
\item[{{\bf Eina\+\_\+\+Bool}}]{global}
\end{DoxyParamCaption}
)}}\label{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}


Make this perspective object be global for its canvas. 


\begin{DoxyParams}{Parameters}
{\em ps} & The given perspective object \\
\hline
{\em global} & {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if the perspective should be global, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.\\
\hline
\end{DoxyParams}
The canvas which this perspective object is being set as global is the one given as argument upon the object creation (the {\ttfamily evas} parameter on the function {\ttfamily edje\+\_\+perspective\+\_\+new(evas)} ).

There can be only one global perspective object set per canvas, and if a perspective object is set to global when there was already another global perspective set, the old one will be set as non-\/global.

A global perspective just affects a part if its Edje object doesn't have a perspective object set to it, and if the part doesn't point to another part to be used as perspective.

\begin{DoxySeeAlso}{See also}
edje\+\_\+object\+\_\+perspective\+\_\+set() 

\hyperlink{group__Edje__Perspective_ga3dd9d197daf58ae5d4e4d37b2a05f6ee}{edje\+\_\+perspective\+\_\+global\+\_\+get()} 

\hyperlink{group__Edje__Perspective_ga4ce415ab5a9f53ba55d921ab5c48a2f4}{edje\+\_\+perspective\+\_\+new()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{edje-perspective_8c-example}{edje-\/perspective.\+c}.\end{Desc}


References E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H, E\+I\+N\+A\+\_\+\+T\+R\+U\+E, and evas\+\_\+object\+\_\+name\+\_\+find().

\hypertarget{group__Edje__Perspective_ga3dd9d197daf58ae5d4e4d37b2a05f6ee}{\index{Edje Perspective@{Edje Perspective}!edje\+\_\+perspective\+\_\+global\+\_\+get@{edje\+\_\+perspective\+\_\+global\+\_\+get}}
\index{edje\+\_\+perspective\+\_\+global\+\_\+get@{edje\+\_\+perspective\+\_\+global\+\_\+get}!Edje Perspective@{Edje Perspective}}
\subsubsection[{edje\+\_\+perspective\+\_\+global\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} edje\+\_\+perspective\+\_\+global\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Edje\+\_\+\+Perspective $\ast$}]{ps}
\end{DoxyParamCaption}
)}}\label{group__Edje__Perspective_ga3dd9d197daf58ae5d4e4d37b2a05f6ee}


Get whether the given perspective object is global or not. 


\begin{DoxyParams}{Parameters}
{\em ps} & The given perspective object. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if this perspective object is global, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}{edje\+\_\+perspective\+\_\+global\+\_\+set()} 
\end{DoxySeeAlso}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E.

\hypertarget{group__Edje__Perspective_ga12deee9aee68c698cbefa3581ccb268c}{\index{Edje Perspective@{Edje Perspective}!edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get@{edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get}}
\index{edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get@{edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get}!Edje Perspective@{Edje Perspective}}
\subsubsection[{edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}const Edje\+\_\+\+Perspective$\ast$ edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get (
\begin{DoxyParamCaption}
\item[{const {\bf Evas} $\ast$}]{e}
\end{DoxyParamCaption}
)}}\label{group__Edje__Perspective_ga12deee9aee68c698cbefa3581ccb268c}


Get the global perspective object set for this canvas. 


\begin{DoxyParams}{Parameters}
{\em e} & The given canvas (Evas). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The perspective object set as global for this canvas. Or {\ttfamily N\+U\+L\+L} if there is no global perspective set and on errors.
\end{DoxyReturn}
This function will return the perspective object that was set as global with \hyperlink{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}{edje\+\_\+perspective\+\_\+global\+\_\+set()}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}{edje\+\_\+perspective\+\_\+global\+\_\+set()} 

\hyperlink{group__Edje__Perspective_ga3dd9d197daf58ae5d4e4d37b2a05f6ee}{edje\+\_\+perspective\+\_\+global\+\_\+get()} 
\end{DoxySeeAlso}


References evas\+\_\+object\+\_\+data\+\_\+get(), and evas\+\_\+object\+\_\+name\+\_\+find().

