images_renderer_unittest.cpp File Reference

#include <iostream>
#include <glib.h>
#include <glib-object.h>
#include "images_renderer.h"
#include "images_document.h"
Include dependency graph for images_renderer_unittest.cpp:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main (  ) 

Definition at line 35 of file images_renderer_unittest.cpp.

References Clockwise_Degrees_0, images::ImagePageAttrs::desired_height, images::ImagePageAttrs::desired_width, images::ImagesDocument::get_anchor_of_page(), images::ImagesDocument::open_document(), images::ImagesDocument::page_count(), images::ImagesRenderer::render(), images::ImagePageAttrs::rotation, and images::ImagePageAttrs::zoom.

00036 {
00037     g_type_init();
00038     g_thread_init(0);
00039 
00040     ImagesDocument doc;
00041     doc.open_document("/data/wa/uds/trunk/sample");
00042 
00043     ImagesRenderer renderer(&doc);
00044 
00045     ImagePageAttrs attrs;
00046     attrs.desired_width = 800;
00047     attrs.desired_height = 600;
00048     attrs.zoom = 100;
00049     attrs.rotation = Clockwise_Degrees_0;
00050 
00051     int i = doc.page_count() / 2;
00052     std::string anchor;
00053     if (doc.get_anchor_of_page(i, anchor))
00054     {
00055         renderer.render(anchor, attrs, -1, 0);
00056     }
00057     // Sleep a while to wait the tasks get the chance to running.
00058     usleep(50*1000);
00059 
00060     return 0;
00061 }

Here is the call graph for this function:

Generated by  doxygen 1.6.2-20100208