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


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


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$ \mbox{\hyperlink{group__Edje__Perspective_ga4ce415ab5a9f53ba55d921ab5c48a2f4}{edje\+\_\+perspective\+\_\+new}} (\mbox{\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 \mbox{\hyperlink{group__Edje__Perspective_ga51e6fa1a3a019919834770e78a39865d}{edje\+\_\+perspective\+\_\+free}} (\mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$ps)
\begin{DoxyCompactList}\small\item\em Deletes the given perspective object. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Edje__Perspective_gaeee5dfe8b3f428583e4f8a846f0b0d15}{edje\+\_\+perspective\+\_\+set}} (\mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$ps, \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord}} px, \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord}} py, \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord}} z0, \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord}} foc)
\begin{DoxyCompactList}\small\item\em Sets up the transform for this perspective object. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}{edje\+\_\+perspective\+\_\+global\+\_\+set}} (\mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$ps, \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} global)
\begin{DoxyCompactList}\small\item\em Makes this perspective object be global for its canvas. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Edje__Perspective_ga3dd9d197daf58ae5d4e4d37b2a05f6ee}{edje\+\_\+perspective\+\_\+global\+\_\+get}} (const \mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$ps)
\begin{DoxyCompactList}\small\item\em Gets whether the given perspective object is global or not. \end{DoxyCompactList}\item 
const \mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$ \mbox{\hyperlink{group__Edje__Perspective_ga12deee9aee68c698cbefa3581ccb268c}{edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get}} (const \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} $\ast$e)
\begin{DoxyCompactList}\small\item\em Gets the global perspective object set for this canvas. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

Perspective is a graphical tool that makes objets represented in 2D look like they have a 3D 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}
\mbox{\Hypertarget{group__Edje__Perspective_ga4ce415ab5a9f53ba55d921ab5c48a2f4}\label{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{\texorpdfstring{edje\+\_\+perspective\+\_\+new()}{edje\_perspective\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}}$\ast$ edje\+\_\+perspective\+\_\+new (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} $\ast$}]{e }\end{DoxyParamCaption})}



Creates a new perspective in the given canvas. 


\begin{DoxyParams}{Parameters}
{\em e} & The given canvas (Evas). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An \mbox{\hyperlink{group__Edje__Perspective}{Edje Perspective}} object for this canvas, or {\ttfamily N\+U\+LL} 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}
\mbox{\hyperlink{group__Edje__Perspective_gaeee5dfe8b3f428583e4f8a846f0b0d15}{edje\+\_\+perspective\+\_\+set()}} 

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


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

\mbox{\Hypertarget{group__Edje__Perspective_ga51e6fa1a3a019919834770e78a39865d}\label{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{\texorpdfstring{edje\+\_\+perspective\+\_\+free()}{edje\_perspective\_free()}}
{\footnotesize\ttfamily void edje\+\_\+perspective\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$}]{ps }\end{DoxyParamCaption})}



Deletes the given perspective object. 


\begin{DoxyParams}{Parameters}
{\em ps} & A valid perspective object, or {\ttfamily N\+U\+LL}.\\
\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\textquotesingle{}t be applied anymore.

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


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

\mbox{\Hypertarget{group__Edje__Perspective_gaeee5dfe8b3f428583e4f8a846f0b0d15}\label{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{\texorpdfstring{edje\+\_\+perspective\+\_\+set()}{edje\_perspective\_set()}}
{\footnotesize\ttfamily void edje\+\_\+perspective\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$}]{ps,  }\item[{\mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord}}}]{px,  }\item[{\mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord}}}]{py,  }\item[{\mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord}}}]{z0,  }\item[{\mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\+\_\+\+Coord}}}]{foc }\end{DoxyParamCaption})}



Sets up 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 3D conversion (where all lines converge to like when artists draw 3D 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
\mbox{\hyperlink{edje-perspective_8c-example}{edje-\/perspective.\+c}}.\end{Desc}


References efl\+\_\+data\+\_\+scope\+\_\+get(), E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH, E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH, and E\+I\+N\+A\+\_\+\+T\+R\+UE.

\mbox{\Hypertarget{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}\label{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{\texorpdfstring{edje\+\_\+perspective\+\_\+global\+\_\+set()}{edje\_perspective\_global\_set()}}
{\footnotesize\ttfamily void edje\+\_\+perspective\+\_\+global\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$}]{ps,  }\item[{\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}}]{global }\end{DoxyParamCaption})}



Makes 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\+UE} if the perspective should be global, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} 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\textquotesingle{}t have a perspective object set to it, and if the part doesn\textquotesingle{}t point to another part to be used as perspective.

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

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

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


References E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH, E\+I\+N\+A\+\_\+\+T\+R\+UE, evas\+\_\+object\+\_\+name\+\_\+find(), and evas\+\_\+object\+\_\+name\+\_\+set().

\mbox{\Hypertarget{group__Edje__Perspective_ga3dd9d197daf58ae5d4e4d37b2a05f6ee}\label{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{\texorpdfstring{edje\+\_\+perspective\+\_\+global\+\_\+get()}{edje\_perspective\_global\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} edje\+\_\+perspective\+\_\+global\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}} $\ast$}]{ps }\end{DoxyParamCaption})}



Gets 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\+UE} if this perspective object is global, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} otherwise.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}{edje\+\_\+perspective\+\_\+global\+\_\+set()}} 
\end{DoxySeeAlso}


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

\mbox{\Hypertarget{group__Edje__Perspective_ga12deee9aee68c698cbefa3581ccb268c}\label{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{\texorpdfstring{edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get()}{edje\_evas\_global\_perspective\_get()}}
{\footnotesize\ttfamily const \mbox{\hyperlink{group__Edje_gaa34f2bebed885cea3d891858ad7c2e2b}{Edje\+\_\+\+Perspective}}$\ast$ edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} $\ast$}]{e }\end{DoxyParamCaption})}



Gets 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\+LL} 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 \mbox{\hyperlink{group__Edje__Perspective_ga9e560272fb6b954a9e99eaad72a6755f}{edje\+\_\+perspective\+\_\+global\+\_\+set()}}.

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

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


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

