Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GR_CAIROPRINTGRAPHICS_H
00022 #define GR_CAIROPRINTGRAPHICS_H
00023
00024 #ifdef HAVE_CONFIG_H
00025 #include "config.h"
00026 #endif
00027 #include <cairo.h>
00028
00029 #include "gr_UnixCairoGraphics.h"
00030
00031
00032
00033
00034
00035 #define gr_PRINTRES 144.
00036
00037
00038 class ABI_EXPORT GR_CairoPrintGraphics : public GR_UnixCairoGraphicsBase
00039 {
00040 bool m_bDoShowPage;
00041 public:
00042 GR_CairoPrintGraphics(cairo_t *cr, UT_uint32 iDeviceResolution);
00043
00044 virtual ~GR_CairoPrintGraphics();
00045
00046 static UT_uint32 s_getClassId() {return GRID_UNIX_PANGO_PRINT;}
00047 virtual UT_uint32 getClassId() {return s_getClassId();}
00048
00049 virtual GR_Capability getCapability() {return GRCAP_PRINTER_ONLY;}
00050 static const char * graphicsDescriptor(){return "Unix Cairo Print";}
00051
00052 virtual bool queryProperties(GR_Graphics::Properties gp) const;
00053
00054 virtual bool startPrint(void);
00055 virtual bool startPage(const char * , UT_uint32 ,
00056 bool , UT_uint32 , UT_uint32 );
00057 virtual bool endPrint(void);
00058
00059 virtual void setCursor(GR_Graphics::Cursor ) { UT_ASSERT_NOT_REACHED(); }
00060 virtual GR_Graphics::Cursor getCursor(void) const { UT_ASSERT_NOT_REACHED(); return GR_CURSOR_INVALID; }
00061 virtual GR_Font * getGUIFont(void);
00062 virtual void setPageSize(char * , UT_uint32 = 0, UT_uint32 =0) { UT_ASSERT_NOT_REACHED(); }
00063
00064 virtual void scroll(UT_sint32, UT_sint32) { UT_ASSERT_NOT_REACHED(); }
00065 virtual void scroll(UT_sint32, UT_sint32, UT_sint32, UT_sint32, UT_sint32, UT_sint32)
00066 { UT_ASSERT_NOT_REACHED(); }
00067
00068 virtual GR_Image * genImageFromRectangle(const UT_Rect & ) { UT_ASSERT_NOT_REACHED(); return NULL;}
00069 virtual void saveRectangle(UT_Rect & , UT_uint32 ) { UT_ASSERT_NOT_REACHED(); }
00070 virtual void restoreRectangle(UT_uint32 ) { UT_ASSERT_NOT_REACHED(); }
00071
00072 double getResolutionRatio(void) const;
00073 void setResolutionRatio(double dres);
00074
00075 virtual bool canQuickPrint(void) const { return true;}
00076
00077 protected:
00078
00079
00080 private:
00081 double m_dResRatio;
00082 };
00083
00084 #endif
00085