Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scpageoutput.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef SCPAGEOUTPUT_H
00008 #define SCPAGEOUTPUT_H
00009 
00010 #include "scribusapi.h"
00011 #include "scribusdoc.h"
00012 #include "page.h"
00013 #include "sccolor.h"
00014 #include "scpainterexbase.h"
00015 #include "scribusstructs.h"
00016 
00017 class PageItem;
00018 class PageItem_ImageFrame;
00019 class PageItem_Line;
00020 class PageItem_PathText;
00021 class PageItem_Polygon;
00022 class PageItem_PolyLine;
00023 class PageItem_TextFrame;
00024 
00025 class SCRIBUS_API MarksOptions
00026 {
00027 public:
00028        MarksOptions(void);
00029        MarksOptions(struct PrintOptions& opt);
00030        double markOffset;
00031        double BleedTop;
00032        double BleedLeft;
00033        double BleedRight;
00034        double BleedBottom;
00035        bool   cropMarks;
00036        bool   bleedMarks;
00037        bool   registrationMarks;
00038        bool   colorMarks;
00039        bool   docInfoMarks;
00040 };
00041 
00042 class SCRIBUS_API ScPageOutput
00043 {
00044 protected:
00045 
00046        ScribusDoc* m_doc;
00047 
00048        bool m_reloadImages;
00049        int  m_imageRes;
00050        bool m_useProfiles;
00051        MarksOptions m_marksOptions;
00052 
00053        virtual void FillPath( PageItem* item, ScPainterExBase* painter, QRect& clip );
00054        virtual void StrokePath( PageItem* item, ScPainterExBase* painter, QRect& clip );
00055 
00056        virtual void DrawMasterItems( ScPainterExBase *painter, Page *page, QRect& clip);
00057        virtual void DrawPageItems( ScPainterExBase *painter, Page *page, QRect& clip);
00058 
00059        virtual void DrawItem( PageItem* item, ScPainterExBase* painter, QRect& clip );
00060        virtual void DrawItem_Pre( PageItem* item, ScPainterExBase* painter );
00061        virtual void DrawItem_Post( PageItem* item, ScPainterExBase* painter );
00062 
00063        virtual void DrawGlyphs(PageItem* item, ScPainterExBase *painter, const CharStyle& style, GlyphLayout& glyphs, QRect& clip);
00064        virtual void DrawItem_Embedded( PageItem* item, ScPainterExBase *p, QRect& clip, const CharStyle& style, PageItem* cembedded);
00065        virtual void DrawPattern( PageItem* item, ScPainterExBase* painter, QRect& clip);
00066        
00067        virtual void DrawItem_ImageFrame( PageItem_ImageFrame* item, ScPainterExBase* painter, QRect& clip );
00068        virtual void DrawItem_Line( PageItem_Line* item, ScPainterExBase* painter, QRect& clip);
00069        virtual void DrawItem_PathText( PageItem_PathText* item, ScPainterExBase* painter, QRect& clip );
00070        virtual void DrawItem_Polygon ( PageItem_Polygon* item , ScPainterExBase* painter, QRect& clip );
00071        virtual void DrawItem_PolyLine( PageItem_PolyLine* item, ScPainterExBase* painte, QRect& clip );
00072        virtual void DrawItem_TextFrame( PageItem_TextFrame* item, ScPainterExBase* painter, QRect& clip );
00073 
00074        virtual void DrawMarks( Page* page, ScPainterExBase* painter, const MarksOptions& options );
00075        virtual void DrawBoxMarks( ScPainterExBase* painter, FPoint& topLeft, FPoint& bottomRight, double offset );
00076        virtual void DrawRegistrationCross( ScPainterExBase* painter );
00077 
00078        ScImage::RequestType translateImageModeToRequest( ScPainterExBase::ImageMode mode);
00079 
00080 public:
00081 
00082        ScPageOutput(ScribusDoc* doc, bool reloadImages = false, int resolution = 72, bool useProfiles = false);
00083 
00084        virtual void begin(void) {};
00085        virtual void DrawPage( Page* page ) {};
00086        virtual void DrawPage( Page* page, ScPainterExBase* painter);
00087        virtual void end(void) {};
00088 
00089        void setMarksOptions(const MarksOptions& opt) { m_marksOptions = opt; }
00090 };
00091 
00092 #endif