diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/cxx/font_effect_blur_color.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/bin/cxx/font_effect_blur_color.cc b/src/bin/cxx/font_effect_blur_color.cc index 18329d4..ebe9140 100644 --- a/src/bin/cxx/font_effect_blur_color.cc +++ b/src/bin/cxx/font_effect_blur_color.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | static int done = 0; | 19 | static int done = 0; |
20 | extern int win_w, win_h; | 20 | extern int win_w, win_h; |
21 | /* private data */ | 21 | /* private data */ |
22 | static evas::text text; | 22 | static evas::text *text; |
23 | static const int MAX_BLUR = 100; | 23 | static const int MAX_BLUR = 100; |
24 | 24 | ||
25 | /* setup */ | 25 | /* setup */ |
@@ -28,13 +28,13 @@ static void _setup(void) | |||
28 | evas::canvas canvas(::eo_ref(G_evas)); | 28 | evas::canvas canvas(::eo_ref(G_evas)); |
29 | int w, h; | 29 | int w, h; |
30 | 30 | ||
31 | evas::text o(efl::eo::parent = canvas); | 31 | evas::text *o = new evas::text(efl::eo::parent = canvas); |
32 | o.evas::object::color_set(0, 0, 0, 255); | 32 | o->evas::object::color_set(0, 0, 0, 255); |
33 | o.font_set("Vera-Bold", 80); | 33 | o->font_set("Vera-Bold", 80); |
34 | o.text_set("Font Effect"); | 34 | o->text_set("Font Effect"); |
35 | o.visibility_set(true); | 35 | o->visibility_set(true); |
36 | o.evas::object::size_get(&w, &h); | 36 | o->evas::object::size_get(&w, &h); |
37 | o.evas::object::position_set((win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) - MAX_BLUR); | 37 | o->evas::object::position_set((win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) - MAX_BLUR); |
38 | text = o; | 38 | text = o; |
39 | done = 0; | 39 | done = 0; |
40 | } | 40 | } |
@@ -42,7 +42,8 @@ static void _setup(void) | |||
42 | /* cleanup */ | 42 | /* cleanup */ |
43 | static void _cleanup(void) | 43 | static void _cleanup(void) |
44 | { | 44 | { |
45 | ::eo_del(text._release()); | 45 | text->visibility_set(false); |
46 | delete text; | ||
46 | } | 47 | } |
47 | 48 | ||
48 | /* loop - do things */ | 49 | /* loop - do things */ |
@@ -53,7 +54,7 @@ static void _loop(double t, int f) | |||
53 | char buf[256]; | 54 | char buf[256]; |
54 | const char *str = "buffer:a(rgba);padding_set(%d);blend(dst=a,color=darkblue);blur(%d,src=a);"; | 55 | const char *str = "buffer:a(rgba);padding_set(%d);blend(dst=a,color=darkblue);blur(%d,src=a);"; |
55 | sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1)); | 56 | sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1)); |
56 | text.filter_program_set(buf); | 57 | text->filter_program_set(buf); |
57 | } | 58 | } |
58 | FPS_STD(NAME); | 59 | FPS_STD(NAME); |
59 | } | 60 | } |