Show
Ignore:
Timestamp:
02/03/09 09:22:18 (3 years ago)
Author:
mirko
Message:

minor changes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/clutter-experiments/page.hh

    r52 r55  
    11// TODO: move implementation in .cc file 
    22// TODO: refine api, it's somewhat ugly right now 
    3 // TODO: should render in a thread? 
     3// TODO: should we render in a thread? 
    44#ifndef __PDFCUBE__PAGE_HH__ 
    55#define __PDFCUBE__PAGE_HH__ 
     
    77#include <glib.h> 
    88#include <poppler.h> 
    9 //#include <clutter/clutter.h> 
    109#include <gdk-pixbuf/gdk-pixbuf.h> 
    1110 
     
    1817   * 
    1918   * This class is used to render low and hi res version of a 
    20    * PopplerPage as a ClutterActor. 
     19   * PopplerPage as GdkPixbufs 
    2120   * 
    22    * Usually on start all the pages will be rendered in a low res 
     21   * Usually, on start, all the pages will be rendered in a low res 
    2322   * version, while higher res versions will be rendered on demand by 
    2423   * the animations. We need to program the animations in advance so 
     
    6564     
    6665    /** 
    67      * @brief Renders the PopplerPage on the desired actor. 
     66     * @brief Renders the PopplerPage on the desired pixbuf. 
    6867     */ 
    6968    void 
     
    9190              } 
    9291 
    93             // GdkPixbuf* low_res_m = NULL; 
    9492            if(!low_res_m) 
    9593              low_res_m = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, w, h); 
     
    107105          { 
    108106            int w, h; 
    109             // we assume 4/3 aspect monitor can do better 
     107            // we assume 4/3 aspect monitor can be done better 
    110108            double box_w = 1600; 
    111109            double box_h = 1200; 
     
    132130                                          0,  
    133131                                          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_data  
    139                (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             */ 
    149132            break; 
    150133          }