Changeset 55 for branches/clutter-experiments/page.hh
- Timestamp:
- 02/03/09 09:22:18 (3 years ago)
- Files:
-
- 1 modified
-
branches/clutter-experiments/page.hh (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/clutter-experiments/page.hh
r52 r55 1 1 // TODO: move implementation in .cc file 2 2 // TODO: refine api, it's somewhat ugly right now 3 // TODO: should render in a thread?3 // TODO: should we render in a thread? 4 4 #ifndef __PDFCUBE__PAGE_HH__ 5 5 #define __PDFCUBE__PAGE_HH__ … … 7 7 #include <glib.h> 8 8 #include <poppler.h> 9 //#include <clutter/clutter.h>10 9 #include <gdk-pixbuf/gdk-pixbuf.h> 11 10 … … 18 17 * 19 18 * This class is used to render low and hi res version of a 20 * PopplerPage as a ClutterActor.19 * PopplerPage as GdkPixbufs 21 20 * 22 * Usually on startall the pages will be rendered in a low res21 * Usually, on start, all the pages will be rendered in a low res 23 22 * version, while higher res versions will be rendered on demand by 24 23 * the animations. We need to program the animations in advance so … … 65 64 66 65 /** 67 * @brief Renders the PopplerPage on the desired actor.66 * @brief Renders the PopplerPage on the desired pixbuf. 68 67 */ 69 68 void … … 91 90 } 92 91 93 // GdkPixbuf* low_res_m = NULL;94 92 if(!low_res_m) 95 93 low_res_m = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, w, h); … … 107 105 { 108 106 int w, h; 109 // we assume 4/3 aspect monitor can dobetter107 // we assume 4/3 aspect monitor can be done better 110 108 double box_w = 1600; 111 109 double box_h = 1200; … … 132 130 0, 133 131 hi_res_m); 134 GError* error = 0;135 136 /*137 if(!hi_res_m) hi_res_m = clutter_texture_new();138 clutter_texture_set_from_rgb_data139 (CLUTTER_TEXTURE(hi_res_m),140 gdk_pixbuf_get_pixels(buffer),141 gdk_pixbuf_get_has_alpha(buffer),142 gdk_pixbuf_get_width(buffer),143 gdk_pixbuf_get_height(buffer),144 gdk_pixbuf_get_rowstride(buffer),145 4, (ClutterTextureFlags)0,146 &error);147 g_object_unref(buffer);148 */149 132 break; 150 133 }

