\hypertarget{evas-map-utils_8c-example}{}\section{evas-\/map-\/utils.\+c}

\begin{DoxyCodeInclude}

\textcolor{preprocessor}{#ifdef HAVE\_CONFIG\_H}
\textcolor{preprocessor}{#include "config.h"}
\textcolor{preprocessor}{#else}
\textcolor{preprocessor}{#define PACKAGE\_EXAMPLES\_DIR "."}
\textcolor{preprocessor}{#endif}

\textcolor{preprocessor}{#include <Ecore.h>}
\textcolor{preprocessor}{#include <\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}>}

\textcolor{preprocessor}{#include <stdlib.h>}
\textcolor{preprocessor}{#include <stdio.h>}
\textcolor{preprocessor}{#include <string.h>}
\textcolor{preprocessor}{#include <math.h>}
\textcolor{preprocessor}{#include "evas-common.h"}

\textcolor{preprocessor}{#define WIDTH  480}
\textcolor{preprocessor}{#define HEIGHT 480}

\textcolor{keyword}{typedef} \textcolor{keyword}{struct}
\{
   Ecore\_Evas *ee;
   \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}       *canvas;
   \textcolor{keyword}{struct }\{
        \textcolor{keywordtype}{int} r, g, b, a;
   \} colors[6];
   \textcolor{keywordtype}{int} colors\_index;
   \textcolor{keywordtype}{int} frame;
   \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}   alpha : 1;
   \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}   smooth : 1;
   \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}   backface\_culling : 1;
   \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}   apply\_perspective : 1;
   \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}   apply\_lighting : 1;
\} App\_Data;

\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *img1\_path = PACKAGE\_EXAMPLES\_DIR EVAS\_IMAGE\_FOLDER \textcolor{stringliteral}{"/cube1.png"};
\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *img2\_path = PACKAGE\_EXAMPLES\_DIR EVAS\_IMAGE\_FOLDER \textcolor{stringliteral}{"/enlightenment.png"};
\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *img3\_path = PACKAGE\_EXAMPLES\_DIR EVAS\_IMAGE\_FOLDER \textcolor{stringliteral}{"/im1.png"};

\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *help\_string =
        \textcolor{stringliteral}{"Valid commands:\(\backslash\)n"}
        \textcolor{stringliteral}{"\(\backslash\)ta - toggle alpha for maps\(\backslash\)n"}
        \textcolor{stringliteral}{"\(\backslash\)ts - toggle smooth for maps\(\backslash\)n"}
        \textcolor{stringliteral}{"\(\backslash\)tc - switch map color\(\backslash\)n"}
        \textcolor{stringliteral}{"\(\backslash\)tb - toggle backface culling\(\backslash\)n"}
        \textcolor{stringliteral}{"\(\backslash\)tp - toggle perspective\(\backslash\)n"}
        \textcolor{stringliteral}{"\(\backslash\)tl - toggle lighting\(\backslash\)n"}
        \textcolor{stringliteral}{"\(\backslash\)th - prints this help\(\backslash\)n"};

\textcolor{keyword}{static} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}
\_anim\_cb(\textcolor{keywordtype}{void} *data)
\{
   App\_Data *ad = data;
   \hyperlink{group__Evas__Object__Group__Map_gae94fcea124ae4135e8bb15a014b334dc}{Evas\_Map} *m;
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o;
   \textcolor{keywordtype}{int} r, g, b, a;
   \textcolor{keywordtype}{int} win\_w, win\_h, img\_w, img\_h;
   \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord} x, y, w, h;

   \hyperlink{group__Evas__Output__Size_gab2bf31509c58449bc94473f81b1e5ed5}{evas\_output\_size\_get}(ad->canvas, &win\_w, &win\_h);

   m = \hyperlink{group__Evas__Object__Group__Map_ga68a1a6d2dfdd5c9d88a9200eb78cca4e}{evas\_map\_new}(4);
   \hyperlink{group__Evas__Object__Group__Map_gab8575043030c84cd457419e33775d884}{evas\_map\_smooth\_set}(m, ad->smooth);
   \hyperlink{group__Evas__Object__Group__Map_gac40eaffef33cb5a9afe362c9e7759cae}{evas\_map\_alpha\_set}(m, ad->alpha);

   r = ad->colors[ad->colors\_index].r;
   g = ad->colors[ad->colors\_index].g;
   b = ad->colors[ad->colors\_index].b;
   a = ad->colors[ad->colors\_index].a;
   \hyperlink{group__Evas__Object__Group__Map_gafad0e4df4fcd8258fff8c1c1b41c6671}{evas\_map\_util\_points\_color\_set}(m, r, g, b, a);

   o = \hyperlink{group__Evas__Object__Group__Find_ga1552ca218e534ff097578caa2f2b63ee}{evas\_object\_name\_find}(ad->canvas, \textcolor{stringliteral}{"obj1"});
   \hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}(o, &x, &y, &w, &h);

   \hyperlink{group__Evas__Object__Group__Map_gaa21f5c7338fbb125b8e50890b3fefb91}{evas\_map\_util\_points\_populate\_from\_object}(m, o);
   \hyperlink{group__Evas__Object__Group__Map_ga0db530bdf4f619b3c9c4c74c3e87ccac}{evas\_map\_util\_rotate}(m, 3 * ad->frame, x + (w / 2), y + (h / 2));
   evas\_object\_map\_set(o, m);
   evas\_object\_map\_enable\_set(o, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

   o = \hyperlink{group__Evas__Object__Group__Find_ga1552ca218e534ff097578caa2f2b63ee}{evas\_object\_name\_find}(ad->canvas, \textcolor{stringliteral}{"obj2"});
   \hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}(o, &x, &y, &w, &h);
   \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(o, &img\_w, &img\_h);

   \hyperlink{group__Evas__Object__Group__Map_gaea5fa874b56c188ed001f38ad1d05d7d}{evas\_map\_util\_points\_populate\_from\_object\_full}(m, o, 100);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 0, 0, 0);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 1, img\_w, 0);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 2, img\_w, img\_h);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 3, 0, img\_h);
   \hyperlink{group__Evas__Object__Group__Map_ga8ec45ba806d347d313556b0d5c5330c8}{evas\_map\_util\_3d\_rotate}(m, ad->frame * 6, ad->frame * 6, ad->frame * 6,
                           x + (w / 3), y + 10, 0);
   \textcolor{keywordflow}{if} (ad->apply\_lighting)
     \hyperlink{group__Evas__Object__Group__Map_gaffb11ebe4dfd914f97cdde7e9f713c97}{evas\_map\_util\_3d\_lighting}(m, win\_w / 2, win\_h / 2, -100,
                               255, 255, 255, 0, 0, 0);
   evas\_object\_map\_set(o, m);
   evas\_object\_map\_enable\_set(o, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

   o = \hyperlink{group__Evas__Object__Group__Find_ga1552ca218e534ff097578caa2f2b63ee}{evas\_object\_name\_find}(ad->canvas, \textcolor{stringliteral}{"obj3"});
   \hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}(o, &x, &y, &w, &h);
   \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(o, &img\_w, &img\_h);

   \hyperlink{group__Evas__Object__Group__Map_ga535ba6d2e0d57f0854c201507a74826e}{evas\_map\_util\_points\_populate\_from\_geometry}(m, x, y + (h / 2)
      , w, h, -20);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 0, 0, 0);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 1, img\_w, 0);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 2, img\_w, img\_h);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 3, 0, img\_h);
   \hyperlink{group__Evas__Object__Group__Map_ga8ec45ba806d347d313556b0d5c5330c8}{evas\_map\_util\_3d\_rotate}(m, 20, ad->frame * 6, 0,
                           x + (w / 2), y + (w / 2), w / 2);

   \textcolor{keywordflow}{if} (ad->apply\_perspective)
     \hyperlink{group__Evas__Object__Group__Map_ga2d28d92f2189d8ec098c6dd29da6cdca}{evas\_map\_util\_3d\_perspective}(m, x + (w / 2), y + (h / 2), 0, 256);
   \textcolor{keywordflow}{if} (ad->apply\_lighting)
     \{
        \hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord} mx, my;
        evas\_pointer\_canvas\_xy\_get(ad->canvas, &mx, &my);
        \hyperlink{group__Evas__Object__Group__Map_gaffb11ebe4dfd914f97cdde7e9f713c97}{evas\_map\_util\_3d\_lighting}(m, mx, my, -256,
                                  255, 255, 255, 0, 0, 0);
     \}
   \textcolor{keywordflow}{if} (ad->backface\_culling)
     \{
        \textcolor{keywordflow}{if} (\hyperlink{group__Evas__Object__Group__Map_gaf9b0303984e52012014bdade3e8f2ad0}{evas\_map\_util\_clockwise\_get}(m))
          \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(o);
        \textcolor{keywordflow}{else}
          \hyperlink{group__Evas__Object__Group__Basic_gacc307a0d7bfc9df151fd9ec75808c587}{evas\_object\_hide}(o);
     \}
   \textcolor{keywordflow}{else}
     \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(o);
   evas\_object\_map\_set(o, m);
   evas\_object\_map\_enable\_set(o, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

   \hyperlink{group__Evas__Object__Group__Map_gab3e18d6086e352b121a57c130041bb24}{evas\_map\_free}(m);

   o = \hyperlink{group__Evas__Object__Group__Find_ga1552ca218e534ff097578caa2f2b63ee}{evas\_object\_name\_find}(ad->canvas, \textcolor{stringliteral}{"obj4"});
   \hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}(o, &x, &y, &w, &h);
   \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(evas\_object\_image\_source\_get(o), &img\_w, &img\_h);

   m = \hyperlink{group__Evas__Object__Group__Map_ga68a1a6d2dfdd5c9d88a9200eb78cca4e}{evas\_map\_new}(4);
   \hyperlink{group__Evas__Object__Group__Map_ga46ab921df9fe617d6c241056784217b7}{evas\_map\_point\_coord\_set}(m, 0, x, y + h, 0);
   \hyperlink{group__Evas__Object__Group__Map_ga46ab921df9fe617d6c241056784217b7}{evas\_map\_point\_coord\_set}(m, 1, x + w, y + h, 0);
   \hyperlink{group__Evas__Object__Group__Map_ga46ab921df9fe617d6c241056784217b7}{evas\_map\_point\_coord\_set}(m, 2, win\_w - 10, win\_h - 30, 0);
   \hyperlink{group__Evas__Object__Group__Map_ga46ab921df9fe617d6c241056784217b7}{evas\_map\_point\_coord\_set}(m, 3, (win\_w / 2) + 10, win\_h - 30, 0);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 0, 0, img\_h);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 1, img\_w, img\_h);
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 2, img\_w, 2 * (img\_h / 3));
   \hyperlink{group__Evas__Object__Group__Map_ga2f1b4d78f055c1752ab254a7ebce13b3}{evas\_map\_point\_image\_uv\_set}(m, 3, 0, 2 * (img\_h / 3));
   \hyperlink{group__Evas__Object__Group__Map_ga2ba9f77377f7cc1a79deecb938c8289c}{evas\_map\_point\_color\_set}(m, 0, 200, 200, 200, 150);
   \hyperlink{group__Evas__Object__Group__Map_ga2ba9f77377f7cc1a79deecb938c8289c}{evas\_map\_point\_color\_set}(m, 1, 200, 200, 200, 150);
   \hyperlink{group__Evas__Object__Group__Map_ga2ba9f77377f7cc1a79deecb938c8289c}{evas\_map\_point\_color\_set}(m, 2, 0, 0, 0, 0);
   \hyperlink{group__Evas__Object__Group__Map_ga2ba9f77377f7cc1a79deecb938c8289c}{evas\_map\_point\_color\_set}(m, 3, 0, 0, 0, 0);
   evas\_object\_map\_set(o, m);
   evas\_object\_map\_enable\_set(o, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

   \hyperlink{group__Evas__Object__Group__Map_gab3e18d6086e352b121a57c130041bb24}{evas\_map\_free}(m);

   ad->frame = (ad->frame + 1) % 60;

   \textcolor{keywordflow}{return} \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE};
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_keydown(\textcolor{keywordtype}{void} *data, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED, \textcolor{keywordtype}{void} *event)
\{
   App\_Data *ad = data;
   \hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down} *ev = event;
   \textcolor{keywordflow}{switch} (ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}[0])
     \{
      \textcolor{keywordflow}{case} \textcolor{charliteral}{'a'}:
         ad->alpha = !ad->alpha;
         \textcolor{keywordflow}{break};
      \textcolor{keywordflow}{case} \textcolor{charliteral}{'s'}:
         ad->smooth = !ad->smooth;
         \textcolor{keywordflow}{break};
      \textcolor{keywordflow}{case} \textcolor{charliteral}{'c'}:
         ad->colors\_index = (ad->colors\_index + 1) % 6;
         \textcolor{keywordflow}{break};
      \textcolor{keywordflow}{case} \textcolor{charliteral}{'b'}:
         ad->backface\_culling = !ad->backface\_culling;
         \textcolor{keywordflow}{break};
      \textcolor{keywordflow}{case} \textcolor{charliteral}{'p'}:
         ad->apply\_perspective = !ad->apply\_perspective;
         \textcolor{keywordflow}{break};
      \textcolor{keywordflow}{case} \textcolor{charliteral}{'l'}:
         ad->apply\_lighting = !ad->apply\_lighting;
         \textcolor{keywordflow}{break};
      \textcolor{keywordflow}{case} \textcolor{charliteral}{'h'}:
         puts(help\_string);
         \textcolor{keywordflow}{break};
      \textcolor{keywordflow}{default}:
         \textcolor{keywordflow}{break};
     \}
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_objs\_fit(\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e)
\{
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o;
   \textcolor{keywordtype}{int} w, h;

   \hyperlink{group__Evas__Output__Size_gab2bf31509c58449bc94473f81b1e5ed5}{evas\_output\_size\_get}(e, &w, &h);
   w /= 2;
   h /= 2;

   o = \hyperlink{group__Evas__Object__Group__Find_ga1552ca218e534ff097578caa2f2b63ee}{evas\_object\_name\_find}(e, \textcolor{stringliteral}{"obj1"});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(o, w / 4, h / 4);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(o, w / 2, h / 2);

   o = \hyperlink{group__Evas__Object__Group__Find_ga1552ca218e534ff097578caa2f2b63ee}{evas\_object\_name\_find}(e, \textcolor{stringliteral}{"obj2"});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(o, 5 * w / 4, h / 4);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(o, w / 2, h / 2);

   o = \hyperlink{group__Evas__Object__Group__Find_ga1552ca218e534ff097578caa2f2b63ee}{evas\_object\_name\_find}(e, \textcolor{stringliteral}{"obj3"});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(o, w / 4, 5 * h / 4);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(o, w / 2, h / 2);

   o = \hyperlink{group__Evas__Object__Group__Find_ga1552ca218e534ff097578caa2f2b63ee}{evas\_object\_name\_find}(e, \textcolor{stringliteral}{"obj4\_source"});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(o, 5 * w / 4, 5 * h / 4);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(o, w / 2, h / 2);

   o = \hyperlink{group__Evas__Object__Group__Find_ga1552ca218e534ff097578caa2f2b63ee}{evas\_object\_name\_find}(e, \textcolor{stringliteral}{"obj4"});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(o, 5 * w / 4, 5 * h / 4);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(o, w / 2, h / 2);
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_resize(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED, \textcolor{keywordtype}{void} *event 
      EINA\_UNUSED)
\{
   \_objs\_fit(e);
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_free(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED, \textcolor{keywordtype}{void} *
      event EINA\_UNUSED)
\{
   \hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}();
\}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{void})
\{
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *bg, *o, *osrc;
   \textcolor{keyword}{static} App\_Data d = \{
        .ee = NULL,
        .canvas = NULL,
        .colors = \{
             \{ 255, 255, 255, 255 \},
             \{ 128, 128, 0, 128 \},
             \{ 255, 0, 0, 255 \},
             \{ 64, 128, 255, 255 \},
             \{ 11, 23, 58, 132 \},
             \{ 0, 0, 0, 255 \}
        \},
        .colors\_index = 0,
        .frame = 0,
        .alpha = \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE},
        .smooth = \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE},
        .backface\_culling = \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE},
        .apply\_perspective = \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE},
        .apply\_lighting = \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}
   \};

   \textcolor{keywordflow}{if} (!\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}())
     \textcolor{keywordflow}{return} EXIT\_FAILURE;

   d.ee = \hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}(NULL, 0, 0, WIDTH, HEIGHT, NULL);
   \textcolor{keywordflow}{if} (!d.ee)
     \textcolor{keywordflow}{goto} \hyperlink{namespaceefl_1_1eina_1_1log__level_a0eec9fe47d243634f680b56a7d768ec7}{error};

   d.canvas = \hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}(d.ee);

   bg = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(d.canvas);
   \hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(bg, img1\_path, NULL);
   \hyperlink{group__Ecore__Evas__Group_gac35627a5c3a766ee42762dbcc9eb733d}{ecore\_evas\_object\_associate}(d.ee, bg, 0);
   evas\_object\_focus\_set(bg, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(bg, 0, 0);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(bg, WIDTH, HEIGHT);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(bg);

   o = \hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}(d.canvas);
   evas\_object\_name\_set(o, \textcolor{stringliteral}{"obj1"});
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(o, 128, 0, 200, 200);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(o);

   o = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(d.canvas);
   evas\_object\_name\_set(o, \textcolor{stringliteral}{"obj2"});
   \hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(o, img2\_path, NULL);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(o);

   o = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(d.canvas);
   evas\_object\_name\_set(o, \textcolor{stringliteral}{"obj3"});
   \hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(o, img2\_path, NULL);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(o);

   osrc = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(d.canvas);
   \hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(osrc, img3\_path, NULL);
   evas\_object\_name\_set(osrc, \textcolor{stringliteral}{"obj4\_source"});
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(osrc);

   o = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(d.canvas);
   evas\_object\_image\_source\_set(o, osrc);
   evas\_object\_name\_set(o, \textcolor{stringliteral}{"obj4"});
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(o);

   \_objs\_fit(d.canvas);

   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(bg, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}, \_on\_keydown, &d);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(bg, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa554e3341a4ae95e15d42da495f8adb21}{EVAS\_CALLBACK\_RESIZE}, \_on\_resize, NULL);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(bg, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aaab869b5d534f02f1b3e151e2406a8c24}{EVAS\_CALLBACK\_FREE}, \_on\_free, NULL);

   \hyperlink{group__Ecore__Animator__Group_gaa1e33b8be9117a26918823c535e429ea}{ecore\_animator\_add}(\_anim\_cb, &d);

   \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}();

   \hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}();
   \textcolor{keywordflow}{return} 0;

\hyperlink{namespaceefl_1_1eina_1_1log__level_a0eec9fe47d243634f680b56a7d768ec7}{error}:
   fprintf(stderr, \textcolor{stringliteral}{"you got to have at least one evas engine built and linked"}
                   \textcolor{stringliteral}{" up to ecore-evas for this example to run properly.\(\backslash\)n"});
   \hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}();
   \textcolor{keywordflow}{return} -1;
\}
\end{DoxyCodeInclude}
 