00001
00002
00003
00004
00005
00006 #ifndef PDFRasterizer_H
00007 #define PDFRasterizer_H
00008
00009 #include <PDF/Page.h>
00010 #include <C/PDF/TRN_PDFRasterizer.h>
00011
00012 namespace pdftron {
00013 namespace PDF {
00014
00026 class PDFRasterizer
00027 {
00028 public:
00029
00043 enum Type {
00044 e_BuiltIn,
00045 e_GDIPlus
00046 };
00047
00051 PDFRasterizer(Type type = e_BuiltIn);
00052 ~PDFRasterizer();
00053
00104 void Rasterize(Page& page, UChar* in_out_image_buffer,
00105 int width, int height, int stride,
00106 const Common::Matrix2D& device_mtx,
00107 const Rect* clip = 0,
00108 const Rect* scrl_clp_regions = 0,
00109 volatile bool* cancel = 0);
00110
00136 void Rasterize(Page& page, void* hdc,
00137 const Common::Matrix2D& device_mtx,
00138 const Rect* clip = 0,
00139 int dpi = -1,
00140 volatile bool* cancel = 0);
00141
00148 void SetDrawAnnotations(bool render_annots);
00149
00159 void SetAntiAliasing(bool enable_aa);
00160
00174 void SetImageSmoothing(bool smoothing_enabled = true);
00175
00182 void SetCaching(bool enabled = true);
00183
00196 void SetGamma(double exp);
00197
00207 void SetOCGContext(OCG::Context* ctx);
00208
00214 typedef void (*ErrorReportProc) (const char* message, void* data);
00215
00223 void SetErrorReportProc(ErrorReportProc error_proc, void* data);
00224
00233 void SetRasterizerType (Type type);
00234
00238 Type GetRasterizerType ();
00239
00241 TRN_PDFRasterizer mp_rast;
00243 };
00244
00245
00246 #include <Impl/PDFRasterizer.inl>
00247
00248
00249 };
00250 };
00251
00252 #endif
00253
00254
00255