|
Revision 44, 0.9 KB
(checked in by mirko, 3 years ago)
|
|
First (awful) pigment experiments
|
| Line | |
|---|
| 1 | #ifndef __PDFCUBE__PAGE_HH__ |
|---|
| 2 | #define __PDFCUBE__PAGE_HH__ |
|---|
| 3 | |
|---|
| 4 | #include <glib.h> |
|---|
| 5 | #include <poppler.h> |
|---|
| 6 | #include <pgm/pgm.h> |
|---|
| 7 | |
|---|
| 8 | namespace PDFCube { |
|---|
| 9 | |
|---|
| 10 | class Page |
|---|
| 11 | { |
|---|
| 12 | public: |
|---|
| 13 | Page(PopplerPage* poppler_page) |
|---|
| 14 | : poppler_page_m(poppler_page), |
|---|
| 15 | low_res_m(NULL), |
|---|
| 16 | hi_res_m(NULL) |
|---|
| 17 | { } |
|---|
| 18 | |
|---|
| 19 | enum RenderingMode { LOW_RES, HI_RES }; |
|---|
| 20 | |
|---|
| 21 | void |
|---|
| 22 | render(RenderingMode mode); |
|---|
| 23 | |
|---|
| 24 | void |
|---|
| 25 | free(RenderingMode mode); |
|---|
| 26 | |
|---|
| 27 | bool |
|---|
| 28 | is_ready(RenderingMode mode); |
|---|
| 29 | |
|---|
| 30 | protected: |
|---|
| 31 | |
|---|
| 32 | /* |
|---|
| 33 | p * GList PopplerLinkMapping enumerating function |
|---|
| 34 | */ |
|---|
| 35 | void link_function(gpointer data, gpointer user_data) |
|---|
| 36 | { |
|---|
| 37 | PopplerLinkMapping* link = (PopplerLinkMapping*)data; |
|---|
| 38 | g_print("Link area (%f,%f)x(%f,%f)\n", |
|---|
| 39 | link->area.x1, |
|---|
| 40 | link->area.y1, |
|---|
| 41 | link->area.x2, |
|---|
| 42 | link->area.y2); |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | PopplerPage* poppler_page_m; |
|---|
| 46 | PgmImage* low_res_m; |
|---|
| 47 | PgmImage* hi_res_m; |
|---|
| 48 | }; |
|---|
| 49 | |
|---|
| 50 | } |
|---|
| 51 | |
|---|
| 52 | #endif |
|---|