summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/previews/preview_text_filter.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/doc/previews/preview_text_filter.c b/doc/previews/preview_text_filter.c
index 86f93be85c..a759faf72d 100644
--- a/doc/previews/preview_text_filter.c
+++ b/doc/previews/preview_text_filter.c
@@ -64,8 +64,8 @@ main(int argc, char **argv)
64 const char *font = "Sans"; 64 const char *font = "Sans";
65 const char *filter, *text; 65 const char *filter, *text;
66 int fontsize = 32; 66 int fontsize = 32;
67 Evas_Object *o; 67 Evas_Object *o, *rect;
68 char *whole_filter; 68 Evas *e;
69 int w, h; 69 int w, h;
70 70
71 if (argc < 4) 71 if (argc < 4)
@@ -90,8 +90,18 @@ main(int argc, char **argv)
90 90
91 ecore_evas_show(wpd.ee); 91 ecore_evas_show(wpd.ee);
92 ecore_evas_manual_render_set(wpd.ee, EINA_TRUE); 92 ecore_evas_manual_render_set(wpd.ee, EINA_TRUE);
93 93 ecore_evas_transparent_set(wpd.ee, EINA_TRUE);
94 o = evas_object_text_add(ecore_evas_get(wpd.ee)); 94 ecore_evas_alpha_set(wpd.ee, EINA_TRUE);
95 e = ecore_evas_get(wpd.ee);
96
97 rect = evas_object_rectangle_add(e);
98 evas_object_move(rect, 0, 0);
99 evas_object_resize(rect, w, h);
100 evas_object_color_set(rect, 0, 0, 0, 0);
101 evas_object_show(rect);
102
103 o = evas_object_text_add(e);
104 evas_object_stack_above(o, rect);
95 evas_object_move(o, 0, 0); 105 evas_object_move(o, 0, 0);
96 evas_object_resize(o, w, h); 106 evas_object_resize(o, w, h);
97 evas_object_text_font_set(o, font, fontsize); 107 evas_object_text_font_set(o, font, fontsize);
@@ -99,10 +109,7 @@ main(int argc, char **argv)
99 evas_object_color_set(o, 255, 255, 255, 255); 109 evas_object_color_set(o, 255, 255, 255, 255);
100 evas_object_show(o); 110 evas_object_show(o);
101 111
102 if (asprintf(&whole_filter, "fill(color = #404040); %s", filter) == -1) 112 eo_do(o, evas_obj_text_filter_program_set(filter));
103 return 2;
104 eo_do(o, evas_obj_text_filter_program_set(whole_filter));
105 free(whole_filter);
106 113
107 ecore_evas_manual_render(wpd.ee); 114 ecore_evas_manual_render(wpd.ee);
108 evas_object_geometry_get(o, NULL, NULL, &w, &h); 115 evas_object_geometry_get(o, NULL, NULL, &w, &h);