

Down to the very bottom, Map is simple\+: it takes an object and transforms the way it will be shown on screen. But using it properly can be a bit troublesome.

For the most common operations there are utility functions that help in setting up the map to achieve the desired effects. Now we\textquotesingle{}ll go through an overview of the map API and some of the things that can be done with it.

The full code can be found \mbox{\hyperlink{evas-map-utils_8c-example}{here}}.

To show how some functions work, this example listens to keys pressed to toggle several options. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ Ecore\_Evas\ *ee;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}\ \ \ \ \ \ \ *canvas;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }\{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ r,\ g,\ b,\ a;}
\DoxyCodeLine{\ \ \ \}\ colors[6];}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ colors\_index;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ frame;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ \ \ alpha\ :\ 1;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ \ \ smooth\ :\ 1;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ \ \ backface\_culling\ :\ 1;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ \ \ apply\_perspective\ :\ 1;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ \ \ apply\_lighting\ :\ 1;}
\DoxyCodeLine{\}\ App\_Data;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *img1\_path\ =\ PACKAGE\_EXAMPLES\_DIR\ EVAS\_IMAGE\_FOLDER\ \textcolor{stringliteral}{"{}/cube1.png"{}};}

\end{DoxyCodeInclude}
 In this program, we divide the window in four quadrants, each holding an object that will have different map configurations applied to them in each call to an animator function. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_anim\_cb(\textcolor{keywordtype}{void}\ *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ App\_Data\ *ad\ =\ data;}
\DoxyCodeLine{\ \ \ Evas\_Map\ *m;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *o;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ r,\ g,\ b,\ a;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ win\_w,\ win\_h,\ img\_w,\ img\_h;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}}\ x,\ y,\ w,\ h;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Canvas_ga9db9974a647850d7bd49afb506c9717a}{evas\_output\_size\_get}}(ad-\/>canvas,\ \&win\_w,\ \&win\_h);}

\end{DoxyCodeInclude}
 Let\textquotesingle{}s first create a map and set some of our options to it. Only four points maps are supported, so we\textquotesingle{}ll stick to that magic number. We can set a color for each vertex or apply one for all of them at once 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ m\ =\ \mbox{\hyperlink{group__Evas__Object__Group__Map_gae1a034340cc380623a82c1b84f6a5525}{evas\_map\_new}}(4);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga7899c76876aff4594596df069d68b637}{evas\_map\_smooth\_set}}(m,\ ad-\/>smooth);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga1be766cd6c3f6f637973c93da5b834f3}{evas\_map\_alpha\_set}}(m,\ ad-\/>alpha);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ r\ =\ ad-\/>colors[ad-\/>colors\_index].r;}
\DoxyCodeLine{\ \ \ g\ =\ ad-\/>colors[ad-\/>colors\_index].g;}
\DoxyCodeLine{\ \ \ b\ =\ ad-\/>colors[ad-\/>colors\_index].b;}
\DoxyCodeLine{\ \ \ a\ =\ ad-\/>colors[ad-\/>colors\_index].a;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac722b2b4b2673c8b6cfac99512105275}{evas\_map\_util\_points\_color\_set}}(m,\ r,\ g,\ b,\ a);}

\end{DoxyCodeInclude}
 For the first object, we\textquotesingle{}ll have a plain rectangle. At its creation, this rectangle was set to be semi-\/transparent, but whether its own alpha is used will be defined by the map\textquotesingle{}s alpha setting. If the map\textquotesingle{}s alpha is disabled, then the object will be completely opaque. The map\textquotesingle{}s own color, however, will use any alpha set to it.

So we get our object, initialize our map geometry to match the rectangle and make it rotate around its own center, then apply the map to the object so it takes effect. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \mbox{\hyperlink{group__Evas__Canvas_gac0a36366d4d3b40bf190f5d0c1d714e7}{evas\_object\_name\_find}}(ad-\/>canvas,\ \textcolor{stringliteral}{"{}obj1"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6e8e78e110392480dd612df86a16b630}{evas\_object\_geometry\_get}}(o,\ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gaa7f9acff0a474fbd529f3ecbc2727a6b}{evas\_map\_util\_points\_populate\_from\_object}}(m,\ o);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga1833b01762fdfd6be0d356aa94a3aa1c}{evas\_map\_util\_rotate}}(m,\ 3\ *\ ad-\/>frame,\ x\ +\ (w\ /\ 2),\ y\ +\ (h\ /\ 2));}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gadbb970a1e0da91183bab3af1eb276953}{evas\_object\_map\_set}}(o,\ m);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gafca4ed9f6cb6063ff7e8d9193418129e}{evas\_object\_map\_enable\_set}}(o,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}

\end{DoxyCodeInclude}
 The second object is an image. Here we don\textquotesingle{}t have any color set for the object, but the image itself contains an alpha channel that will not be affected by the map settings, so even with alpha set to be off, the image will still be transparent. Color applied to the map will tint it though. Since setting a map copies it into the object, we can reuse the same one we created before. We initialize it to the new object while all other options are kept the same. Notice that no rotation will be done here, as that\textquotesingle{}s just an utility function that takes the coordinates set for each point of the map and transforms it accordingly. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \mbox{\hyperlink{group__Evas__Canvas_gac0a36366d4d3b40bf190f5d0c1d714e7}{evas\_object\_name\_find}}(ad-\/>canvas,\ \textcolor{stringliteral}{"{}obj2"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6e8e78e110392480dd612df86a16b630}{evas\_object\_geometry\_get}}(o,\ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga29401fb02f1d51ddf09d195f10a004e7}{evas\_object\_image\_size\_get}}(o,\ \&img\_w,\ \&img\_h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gadb6af35fdb37ea54ff6d79faddbd2c19}{evas\_map\_util\_points\_populate\_from\_object\_full}}(m,\ o,\ 100);}

\end{DoxyCodeInclude}
 This time the object is a bit farther into the screen, by using a {\ttfamily z} value higher than 0 to init the map. We also need to map the image used by the object, so Evas knows how to transform it properly. For this we use the \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\+\_\+map\+\_\+point\+\_\+image\+\_\+uv\+\_\+set()}} to tell the map what coordinate within the image corresponds to each point of the map. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 0,\ 0,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 1,\ img\_w,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 2,\ img\_w,\ img\_h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 3,\ 0,\ img\_h);}

\end{DoxyCodeInclude}
 This object will also be rotated, but in all three axis and around some other point, not its center, chosen mostly at random. If enabled, lighting will be applied to, from a light source at the center of the window. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga7fc91b978232af55383baa7eb5ff7037}{evas\_map\_util\_3d\_rotate}}(m,\ ad-\/>frame\ *\ 6,\ ad-\/>frame\ *\ 6,\ ad-\/>frame\ *\ 6,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x\ +\ (w\ /\ 3),\ y\ +\ 10,\ 0);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (ad-\/>apply\_lighting)}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga27cc3c160ce2273889026ce58e32e503}{evas\_map\_util\_3d\_lighting}}(m,\ win\_w\ /\ 2,\ win\_h\ /\ 2,\ -\/100,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 255,\ 255,\ 255,\ 0,\ 0,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gadbb970a1e0da91183bab3af1eb276953}{evas\_object\_map\_set}}(o,\ m);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gafca4ed9f6cb6063ff7e8d9193418129e}{evas\_object\_map\_enable\_set}}(o,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}

\end{DoxyCodeInclude}
 For the third object we are doing, once more, a 3D rotation, but this time perspective will be applied to our map to make it look more realistic. The lighting source also follows the mouse cursor and it\textquotesingle{}s possible to toggle backface culling, so that the object is hidden whenever we are not seeing its front face. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \mbox{\hyperlink{group__Evas__Canvas_gac0a36366d4d3b40bf190f5d0c1d714e7}{evas\_object\_name\_find}}(ad-\/>canvas,\ \textcolor{stringliteral}{"{}obj3"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6e8e78e110392480dd612df86a16b630}{evas\_object\_geometry\_get}}(o,\ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga29401fb02f1d51ddf09d195f10a004e7}{evas\_object\_image\_size\_get}}(o,\ \&img\_w,\ \&img\_h);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga769e1ce26efed137c96bc6983f318439}{evas\_map\_util\_points\_populate\_from\_geometry}}(m,\ x,\ y\ +\ (h\ /\ 2),\ w,\ h,\ -\/20);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 0,\ 0,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 1,\ img\_w,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 2,\ img\_w,\ img\_h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 3,\ 0,\ img\_h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga7fc91b978232af55383baa7eb5ff7037}{evas\_map\_util\_3d\_rotate}}(m,\ 20,\ ad-\/>frame\ *\ 6,\ 0,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x\ +\ (w\ /\ 2),\ y\ +\ (w\ /\ 2),\ w\ /\ 2);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (ad-\/>apply\_perspective)}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gaeaab7b6cc857d5b3e3a99b8c0efbab11}{evas\_map\_util\_3d\_perspective}}(m,\ x\ +\ (w\ /\ 2),\ y\ +\ (h\ /\ 2),\ 0,\ 256);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (ad-\/>apply\_lighting)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}}\ mx,\ my;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Canvas_ga78be2fedcc19c00c61ad8df95f2496f8}{evas\_pointer\_canvas\_xy\_get}}(ad-\/>canvas,\ \&mx,\ \&my);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga27cc3c160ce2273889026ce58e32e503}{evas\_map\_util\_3d\_lighting}}(m,\ mx,\ my,\ -\/256,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 255,\ 255,\ 255,\ 0,\ 0,\ 0);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (ad-\/>backface\_culling)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Evas__Object__Group__Map_ga2fbfe112be2246ec4e0cb49f4e38088a}{evas\_map\_util\_clockwise\_get}}(m))}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae66f71e09a0dc71675f15ebff6765c64}{evas\_object\_hide}}(o);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(o);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gadbb970a1e0da91183bab3af1eb276953}{evas\_object\_map\_set}}(o,\ m);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gafca4ed9f6cb6063ff7e8d9193418129e}{evas\_object\_map\_enable\_set}}(o,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}

\end{DoxyCodeInclude}
 And we free this map, since we messed too much with it and for the last object we want something cleaner. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga219c74ba8e2a4ae4525d2f331b8b5e0a}{evas\_map\_free}}(m);}

\end{DoxyCodeInclude}
 The last object is actually two. One image, with an image set to it, and one image proxying the first one with \mbox{\hyperlink{group__Evas__Object__Image_ga58b0ba36355fe0cfb49a6aaa819e2aa4}{evas\+\_\+object\+\_\+image\+\_\+source\+\_\+set()}}. This way, the second object will show whatever content its source has. This time we\textquotesingle{}ll be using a map more manually to simulate a simple reflection of the original image.

We know that the reflection object is placed just like the original, so we take a shortcut by just getting the geometry of our to-\/be-\/mapped object. We also need to get the image size of the source. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ o\ =\ \mbox{\hyperlink{group__Evas__Canvas_gac0a36366d4d3b40bf190f5d0c1d714e7}{evas\_object\_name\_find}}(ad-\/>canvas,\ \textcolor{stringliteral}{"{}obj4"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6e8e78e110392480dd612df86a16b630}{evas\_object\_geometry\_get}}(o,\ \&x,\ \&y,\ \&w,\ \&h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Image_ga29401fb02f1d51ddf09d195f10a004e7}{evas\_object\_image\_size\_get}}(o,\ \&img\_w,\ \&img\_h);}

\end{DoxyCodeInclude}
 For this we\textquotesingle{}ll create a map shaped so that it begins at the base of our image and it expands horizontally as it grows (downwards) in height. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ m\ =\ \mbox{\hyperlink{group__Evas__Object__Group__Map_gae1a034340cc380623a82c1b84f6a5525}{evas\_map\_new}}(4);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga82d2bac6f3accd23c869f704696d0d53}{evas\_map\_point\_coord\_set}}(m,\ 0,\ x,\ y\ +\ h,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga82d2bac6f3accd23c869f704696d0d53}{evas\_map\_point\_coord\_set}}(m,\ 1,\ x\ +\ w,\ y\ +\ h,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga82d2bac6f3accd23c869f704696d0d53}{evas\_map\_point\_coord\_set}}(m,\ 2,\ win\_w\ -\/\ 10,\ win\_h\ -\/\ 30,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga82d2bac6f3accd23c869f704696d0d53}{evas\_map\_point\_coord\_set}}(m,\ 3,\ (win\_w\ /\ 2)\ +\ 10,\ win\_h\ -\/\ 30,\ 0);}

\end{DoxyCodeInclude}
 Since the reflection should show the image inverted, we need to map it this way. The first point of the map (top-\/left) will be mapped to the mapped to the first pixel of the last row. There\textquotesingle{}s no horizontal reflection and we want the full width of the image, but as we map its upper side ww will only take two thirds of the image. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 0,\ 0,\ img\_h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 1,\ img\_w,\ img\_h);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 2,\ img\_w,\ 2\ *\ (img\_h\ /\ 3));}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_gac20df50c88ca79bc8ffaefb6a2265dd6}{evas\_map\_point\_image\_uv\_set}}(m,\ 3,\ 0,\ 2\ *\ (img\_h\ /\ 3));}

\end{DoxyCodeInclude}
 Finally, to fade out our reflection we set the colors for each point in the map. The two at the top need to be visible, but we\textquotesingle{}ll tone them down a bit and make them a bit translucent. The other two will go straight to full transparency. Evas interpolates the colors from one point to the next, so this will make them fade out. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga02bf5546d997dafe611cb62eccec6f74}{evas\_map\_point\_color\_set}}(m,\ 0,\ 200,\ 200,\ 200,\ 150);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga02bf5546d997dafe611cb62eccec6f74}{evas\_map\_point\_color\_set}}(m,\ 1,\ 200,\ 200,\ 200,\ 150);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga02bf5546d997dafe611cb62eccec6f74}{evas\_map\_point\_color\_set}}(m,\ 2,\ 0,\ 0,\ 0,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga02bf5546d997dafe611cb62eccec6f74}{evas\_map\_point\_color\_set}}(m,\ 3,\ 0,\ 0,\ 0,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gadbb970a1e0da91183bab3af1eb276953}{evas\_object\_map\_set}}(o,\ m);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gafca4ed9f6cb6063ff7e8d9193418129e}{evas\_object\_map\_enable\_set}}(o,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}

\end{DoxyCodeInclude}
 Close up by freeing the map and do some other things needed to keep stuff moving in our animations and we are done. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Map_ga219c74ba8e2a4ae4525d2f331b8b5e0a}{evas\_map\_free}}(m);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ ad-\/>frame\ =\ (ad-\/>frame\ +\ 1)\ \%\ 60;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 The rest of the program is setup and listening to key events. Nothing that matters within the scope of this example, so we are going to skip it. Refer to it \mbox{\hyperlink{evas-map-utils_8c-example}{here}} however to see how everything fits together. 