printctl.h

Go to the documentation of this file.
00001 // $Id: printctl.h 1282 2006-06-09 09:46:49Z alex $
00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00003 ================================XARAHEADERSTART===========================
00004  
00005                Xara LX, a vector drawing and manipulation program.
00006                     Copyright (C) 1993-2006 Xara Group Ltd.
00007        Copyright on certain contributions may be held in joint with their
00008               respective authors. See AUTHORS file for details.
00009 
00010 LICENSE TO USE AND MODIFY SOFTWARE
00011 ----------------------------------
00012 
00013 This file is part of Xara LX.
00014 
00015 Xara LX is free software; you can redistribute it and/or modify it
00016 under the terms of the GNU General Public License version 2 as published
00017 by the Free Software Foundation.
00018 
00019 Xara LX and its component source files are distributed in the hope
00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00022 See the GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License along
00025 with Xara LX (see the file GPL in the root directory of the
00026 distribution); if not, write to the Free Software Foundation, Inc., 51
00027 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00028 
00029 
00030 ADDITIONAL RIGHTS
00031 -----------------
00032 
00033 Conditional upon your continuing compliance with the GNU General Public
00034 License described above, Xara Group Ltd grants to you certain additional
00035 rights. 
00036 
00037 The additional rights are to use, modify, and distribute the software
00038 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00039 library and any other such library that any version of Xara LX relased
00040 by Xara Group Ltd requires in order to compile and execute, including
00041 the static linking of that library to XaraLX. In the case of the
00042 "CDraw" library, you may satisfy obligation under the GNU General Public
00043 License to provide source code by providing a binary copy of the library
00044 concerned and a copy of the license accompanying it.
00045 
00046 Nothing in this section restricts any of the rights you have under
00047 the GNU General Public License.
00048 
00049 
00050 SCOPE OF LICENSE
00051 ----------------
00052 
00053 This license applies to this program (XaraLX) and its constituent source
00054 files only, and does not necessarily apply to other Xara products which may
00055 in part share the same code base, and are subject to their own licensing
00056 terms.
00057 
00058 This license does not apply to files in the wxXtra directory, which
00059 are built into a separate library, and are subject to the wxWindows
00060 license contained within that directory in the file "WXXTRA-LICENSE".
00061 
00062 This license does not apply to the binary libraries (if any) within
00063 the "libs" directory, which are subject to a separate license contained
00064 within that directory in the file "LIBS-LICENSE".
00065 
00066 
00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00068 ----------------------------------------------
00069 
00070 Subject to the terms of the GNU Public License (see above), you are
00071 free to do whatever you like with your modifications. However, you may
00072 (at your option) wish contribute them to Xara's source tree. You can
00073 find details of how to do this at:
00074   http://www.xaraxtreme.org/developers/
00075 
00076 Prior to contributing your modifications, you will need to complete our
00077 contributor agreement. This can be found at:
00078   http://www.xaraxtreme.org/developers/contribute/
00079 
00080 Please note that Xara will not accept modifications which modify any of
00081 the text between the start and end of this header (marked
00082 XARAHEADERSTART and XARAHEADEREND).
00083 
00084 
00085 MARKS
00086 -----
00087 
00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00089 designs are registered or unregistered trademarks, design-marks, and/or
00090 service marks of Xara Group Ltd. All rights in these marks are reserved.
00091 
00092 
00093       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00094                         http://www.xara.com/
00095 
00096 =================================XARAHEADEREND============================
00097  */
00098 //
00099 // Header for the print control object
00100 
00101 #ifndef INC_PRINTCTL
00102 #define INC_PRINTCTL
00103 
00104 //#include "docrect.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00105 //#include "list.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00106 #include "colplate.h"
00107 
00108 class Spread;
00109 class DocView;
00110 class PrintPatchInfo;
00111 class RenderRegion;
00112 class PrintView;
00113 
00114 //-------------------------------------------------
00115 
00116 enum PrintOrient        { PRINTORIENTATION_UPRIGHT, PRINTORIENTATION_SIDEWAYS };
00117 enum PrintFitType       { PRINTFIT_BEST,PRINTFIT_CUSTOM,PRINTFIT_MULTIPLE,PRINTFIT_BESTPAPER };
00118 enum PrintLayers        { PRINTLAYERS_ALLFOREGROUND, PRINTLAYERS_VISIBLEFOREGROUND };
00119 enum PSLevel            { PSLEVEL_AUTO, PSLEVEL_1, PSLEVEL_2 };
00120 enum PrintMethodType    { PRINTMETHOD_NORMAL, PRINTMETHOD_BITMAP, PRINTMETHOD_AABITMAP };
00121 enum BitmapResMethod    { BITMAPRES_AUTO, BITMAPRES_MANUAL };
00122 enum PrintRangeObj      { PRINTRANGEOBJ_ALL, PRINTRANGEOBJ_SELECTED };
00123 enum PrintRangeDPS      { PRINTRANGEDPS_BOTH, PRINTRANGEDPS_LEFTPAGES, PRINTRANGEDPS_RIGHTPAGES };
00124 enum PrintFillQuality   { PRINTFILLQUALITY_HIGH, PRINTFILLQUALITY_MEDIUM, PRINTFILLQUALITY_LOW };
00125 enum PrintTextOptions   { PRINTTEXTOPTIONS_NORMAL, PRINTTEXTOPTIONS_ALLTEXTASSHAPES };
00126 
00127 
00128 #define DEF_SCREEN_FREQ  60
00129 #define DEF_SCREEN_ANG   15
00130 #define DEF_SCREEN_FUNC  SCRTYPE_SPOT1
00131 
00132 
00133 /********************************************************************************************
00134 
00135 >   class TypesetInfo : public CC_CLASS_MEMDUMP
00136     
00137     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
00138     Created:    11/6/95
00139     Purpose:    A class to encapsulate all the bits of typesetting we provide. The
00140                 main entry in the class is a list of colour plate objects. When printing
00141                 separations, the list is used to (a) determin which separations require
00142                 printing and (b) to set each printable colour plate in the active print
00143                 view. The main print loop will use the access functions in this class to
00144                 cycle through each printable plate. This will result in a set of separated
00145                 representations of a page being produced.
00146                 Other information held in this class pertain to Postscript functionality.
00147                 The class contains the prefered screening values for the entire document.
00148 
00149 ********************************************************************************************/
00150 
00151 class TypesetInfo : public CC_CLASS_MEMDUMP
00152 {
00153     CC_DECLARE_MEMDUMP(TypesetInfo)
00154 
00155     public:
00156         TypesetInfo();
00157         virtual ~TypesetInfo();
00158 
00159         static TypesetInfo *FindTypesetInfoForDoc(Document *pDoc = NULL);
00160 
00161         TypesetInfo& operator=(TypesetInfo& other);
00162 
00163     public:     // Enablement flags
00164         void            SetSeparations(BOOL sep);       // Enable separations (else composite print)
00165 
00166         BOOL            AreSeparating()      const { return MakeSeparations; }
00167         BOOL            AreScreening()       const { return UseScreening; }
00168 
00169     public:     // Default/global screen settings
00170         void            SetScreening(BOOL screen, BOOL SetAllPlates = TRUE);
00171         void            SetPrintResolution(INT32 res, BOOL SetAllPlates = TRUE);
00172         void            SetDefaultScreenFrequency(double Freq, BOOL SetAllPlates = TRUE);
00173         void            SetScreenFunction(ScreenType func, BOOL SetAllPlates = TRUE);
00174 
00175         void            ResetAllPlatesToDefaultScreens(void);
00176         void            EnsureAllPlatesHaveGlobalSettings(void);
00177 
00178         INT32           GetPrintResolution() const              { return PrintResolution; }
00179         double          GetDefaultScreenFrequency() const       { return ScreenFrequency; }
00180         ScreenType      GetScreenFunction() const               { return DefaultScreenType; }
00181         BOOL            GetScreenName(ScreenType type, StringBase *pName);
00182 
00183     public:     // Control of printers marks - see the PrintMarksMan class for more details
00184         void            SetOutputPrintersMarks(BOOL ShowThem)   { ShowPrintersMarks = ShowThem; }
00185         BOOL            OutputPrintersMarks(void) const         { return(ShowPrintersMarks); }
00186 
00187     public:     // Global imagesetter/separation flags
00188         // Emulsion down (reflect plates in X axis)
00189         void            SetEmulsionDown(BOOL On)                { EmulsionDown = On; }
00190         BOOL            PrintEmulsionDown() const               { return EmulsionDown; }
00191 
00192         // Photographic negative
00193         void            SetPhotoNegative(BOOL On);
00194         BOOL            PrintPhotoNegative() const              { return PhotoNegative; }
00195 
00196         // Always overprint "black" (more than 95% Key CMYK colours)
00197         void            SetOverprintBlack(BOOL Always);
00198         BOOL            AlwaysOverprintBlack() const            { return OverprintBlack; }
00199 
00200     public:
00201         // The plate list creation and access functions. These functions
00202         // allow the building and maintenance of a list of colour plates.
00203         // As the list differs from the list of plates to print in that it
00204         // contains all document plates rather than just that set actively
00205         // being printed, you should use these functions when concerned with
00206         // dialogue management.     
00207         BOOL            CreatePlateList();
00208         void            UpdatePlateList();
00209         ColourPlate*    CreateColourPlate();
00210 
00211         void            AddPlate(ColourPlate* pPlate);
00212         void            DestroyPlateList();
00213 
00214         ColourPlate*    GetCurrentPlate() const;
00215         void            SetCurrentPlate(ColourPlate* pPlate);
00216         DWORD           GetNumPlates() const;
00217         
00218         inline ColourPlate* GetFirstPlate() const;
00219         inline ColourPlate* GetNextPlate(const ColourPlate* pPlate) const;
00220         inline ColourPlate* GetPrevPlate(const ColourPlate* pPlate) const;
00221 
00222         // The printing plate access functions. These functions are specifically
00223         // used to track the plates marked for printing.        
00224         void            InitPlatesForPrinting();
00225         ColourPlate*    GetFirstPrintPlate();
00226         ColourPlate*    GetNextPrintPlate();
00227         DWORD           GetNumPrintPlates() const;
00228         ColourPlate*    GetCurrentPrintPlate() const;
00229         INT32           NumPrintPlatesRemaining() const;
00230         void            SetNextCompositePlate();
00231 
00232 
00233         // All the private class strutures, hands off! And no making them public or else!
00234     private:
00235         BOOL            CheckForExistingPlate(ColourPlateType Type, IndexedColour *SpotColour = NULL);
00236         ColourPlate*    GetPrintPlate(DWORD num, ColourPlate* pPlate);
00237 
00238     private:
00239         BOOL            MakeSeparations;            // Determins whether separations are printed
00240         INT32           PrintResolution;            // The resolution of the printing device.
00241         double          ScreenFrequency;            // The default screen frequency (LPI)
00242         ScreenType      DefaultScreenType;          // The default screen type
00243 
00244         BOOL            UseScreening;               // Are we outputing screening functions?
00245 
00246         BOOL            ShowPrintersMarks;          // TRUE if printers marks are enabled in this doc
00247 
00248         BOOL            EmulsionDown;               // TRUE if doing EmDown (reflect-in-X) plates
00249         BOOL            PhotoNegative;              // TRUE if doing photographic negative plates
00250         BOOL            OverprintBlack;             // TRUE to always overprint CMYK colours with Key >95%
00251         BOOL            PrintSpotAsProcess;         // TRUE to convert all spot colours to process
00252 
00253     private:
00254         List            PrintingPlates;             // The list of plates (enabled/disabled)
00255 
00256         DWORD           NumPrintPlates;             // differs from list number as some are disabled
00257         DWORD           CurrPrintPlateNum;          // the list number of the plate we're printing
00258         DWORD           PrintPlatesToGo;            // Number of plates left to print
00259         ColourPlate*    CurrentPlate;               // Use GetCurrent/SetCurrent plate for this
00260         ColourPlate*    CurrentPrintPlate;          // A multipass print related pointer
00261 };
00262 
00263 
00264 /********************************************************************************************
00265 
00266 >   inline ColourPlate* TypesetInfo::GetFirstPlate() const
00267     inline ColourPlate* TypesetInfo::GetNextPlate(const ColourPlate* pPlate) const
00268     inline ColourPlate* TypesetInfo::GetPrevPlate(const ColourPlate* pPlate) const
00269     
00270     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
00271     Created:    11/6/95
00272     Purpose:    A couple of fast access functions for retrieving plates from the
00273                 documents plate list.
00274 
00275 ********************************************************************************************/
00276 
00277 inline ColourPlate* TypesetInfo::GetFirstPlate() const
00278 {
00279     return (ColourPlate*)PrintingPlates.GetHead();
00280 }
00281 
00282 inline ColourPlate* TypesetInfo::GetNextPlate(const ColourPlate* pPlate) const
00283 {
00284     return (ColourPlate*)PrintingPlates.GetNext((ListItem*)pPlate);
00285 }
00286 
00287 inline ColourPlate* TypesetInfo::GetPrevPlate(const ColourPlate* pPlate) const
00288 {
00289     return (ColourPlate*)PrintingPlates.GetPrev((ListItem*)pPlate);
00290 }
00291 
00292 
00293 
00294 
00295 
00296 /********************************************************************************************
00297 
00298 >   class PrintControl : public CC_CLASS_MEMDUMP
00299 
00300     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00301     Created:    27/3/95
00302     Purpose:    This class encapsulates all the print settings for a document, and controls
00303                 how the document pages are printed on the paper
00304 
00305     SeeAlso:    OptionsTabs; AppPrefsDlg; DocPrefsDlg;
00306 
00307 ********************************************************************************************/
00308 
00309 class PrintControl : public CC_CLASS_MEMDUMP
00310 {
00311     CC_DECLARE_MEMDUMP(PrintControl)
00312 
00313 public:
00314     PrintControl();
00315     ~PrintControl();
00316 
00317     // Set up functions
00318     BOOL SetUp(Spread* pSpread, BOOL RedrawPrintBorders = TRUE);
00319 
00320     // Info functions
00321     String_256 BuildPrintInfoStr();
00322     String_256 BuildPaperSizeStr();
00323 
00324     // Print layout vars
00325     BOOL            IsWholeSpread()                         { return WholeSpread; }
00326     void            SetWholeSpread(BOOL State);
00327 
00328     BOOL            IsDoublePageSpread()                    { return DPS; }
00329     void            SetDoublePageSpread(BOOL State)         { DPS = State; }
00330 
00331     FIXED16         GetScale()                              { return Scale; }
00332     void            SetScale(FIXED16 NewScale);
00333 
00334     PrintOrient     GetPrintOrient()                        { return Orient; }
00335     void            SetPrintOrient(PrintOrient NewOrient);
00336 
00337     PrintFitType    GetFitType()                            { return FitType; }
00338     void            SetFitType(PrintFitType NewFitType);
00339 
00340     TypesetInfo*    GetTypesetInfo()                        { return &Typesetting; }
00341 
00342     
00343     INT32 GetTopMargin()                { return TopMargin; }
00344     void SetTopMargin(INT32 NewVal) { TopMargin = NewVal; }
00345     INT32 GetLeftMargin()           { return LeftMargin; }
00346     void SetLeftMargin(INT32 NewVal)    { LeftMargin = NewVal; }
00347     INT32 GetWidth()                    { return ScaledWidth; }
00348     void SetWidth(INT32 NewVal);
00349     INT32 GetHeight()               { return ScaledHeight;}
00350     void SetHeight(INT32 NewVal);
00351 
00352     INT32 GetRows()                 { return Rows; }
00353     BOOL SetRows(INT32 NewVal);
00354     INT32 GetColumns()              { return Columns; }
00355     BOOL SetColumns(INT32 NewVal);
00356     INT32 GetGutter()               { return Gutter; }
00357     BOOL SetGutter(INT32 NewVal);
00358 
00359     // Print output vars
00360     PrintLayers         GetPrintLayers()                        { return Layers; }
00361     void                SetPrintLayers(PrintLayers NewVal)      { Layers = NewVal; }
00362     PSLevel             GetPSLevel()                            { return PSLangLevel; }
00363     void                SetPSLevel(PSLevel NewVal)              { PSLangLevel = NewVal; }
00364     PrintMethodType     GetPrintMethod();                       //{ return PrintMethod; }
00365     void                SetPrintMethod(PrintMethodType NewVal); //{ PrintMethod = NewVal; }
00366     BitmapResMethod     GetBitmapResMethod()                    { return BitmapResolutionMethod; }
00367     void                SetBitmapResMethod(BitmapResMethod BRM) { BitmapResolutionMethod = BRM; }
00368     INT32               GetDotsPerInch();
00369     void                SetDotsPerInch(INT32 NewVal);
00370     PrintFillQuality    GetFillQuality()                        { return FillQuality; }
00371     void                SetFillQuality(PrintFillQuality Qual)   { FillQuality = Qual; }
00372     PrintTextOptions    GetTextOptions()                        { return TextOptions; }
00373     void                SetTextOptions(PrintTextOptions pto)    { TextOptions = pto; }
00374 
00375     // static print output vars that are not saved with the document.  Instead, these vars
00376     // are global app settings that have related ini file settings
00377     static PrintMethodType AppPrintMethod;  
00378 
00379     // General print vars
00380     BOOL            IsCollated()                            { return Collated; }
00381     void            SetCollated(BOOL NewVal)                { Collated = NewVal; }
00382     INT32           GetNumCopies()                          { return NumCopies; }
00383     void            SetNumCopies(INT32 NewVal)              { NumCopies = NewVal; }
00384     BOOL            GetPrintToFile()                        { return PrintToFile; }
00385     void            SetPrintToFile(BOOL NewVal)             { PrintToFile = NewVal; }
00386     PrintRangeObj   GetObjPrintRange();
00387     void            SetObjPrintRange(PrintRangeObj NewVal)  { ObjPrintRange = NewVal; }
00388     PrintRangeDPS   GetDPSPrintRange()                      { return DPSPrintRange; }
00389     void            SetDPSPrintRange(PrintRangeDPS NewVal)  { DPSPrintRange = NewVal; }
00390 
00391     // This will return either 1 or 2 depending on DPS, WholeSpread and DPSPrintRange
00392     INT32 GetNumPrintablePages();
00393 
00394     // Operators
00395     PrintControl& operator=(PrintControl& other);
00396 
00397     // Functions that deal with the generation of pages and patches used in the main print loop
00398     // We now have plate related functions too!
00399     BOOL StartPrinting();
00400     BOOL MorePaper();
00401     BOOL GetNextPaper();
00402     BOOL ReprintPaper();
00403     BOOL GetNextPatch(PrintPatchInfo* pPatchInfo);
00404     BOOL EndPrinting();
00405 
00406     BOOL StartPlatePrinting(PrintView *pPrintView, UINT32* const errID);
00407     BOOL MorePlates();
00408     BOOL SetNextPlate(PrintView *pPrintView);
00409     void EndPlatePrinting(PrintView *pPrintView);
00410 
00411     // Misc
00412     void StartImport();
00413     void EndImport();
00414     void RenderPrintBorder(RenderRegion* pRRegion);
00415 
00416     static BOOL RedrawPrintableArea(DocView* pDocView);
00417 
00418 private:
00419     //----------------------------------------
00420     // Private members that are used by the print layout functions
00421 
00422     BOOL CalcNumPaper();    // Stuffs the num paper prints we will do into NumPaper
00423     
00424     BOOL    Printing;
00425     BOOL    SelectionPresent;
00426     DocRect PatchClipRect;
00427 
00428     INT32   NumPrintablePages;
00429 
00430     INT32   NumPaper;
00431     INT32   PaperNumber;
00432     INT32   MaxPaperNumber;
00433     BOOL    Reprint;
00434 
00435     INT32   NumPatches;
00436     INT32   PatchNumber;
00437     INT32   MaxPatchNumber;
00438 
00439     // Multiple fit vars
00440     INT32       PatchRow;
00441     INT32       PatchColumn;
00442     MILLIPOINT  SectionWidth;
00443     MILLIPOINT  SectionHeight;
00444 
00445 private:
00446     //----------------------------------------
00447     // Private member vars
00448 
00449     BOOL    PrintAreaSetUp; // Can only be TRUE if SetUp() called successfully
00450     BOOL    SetUpFailed;    // True if the last call to SetUp() failed
00451     Spread* pSpread;        // ptr to the spread that contains objects that we will print
00452 
00453     // The total printable area.  This is the area which we will try and print.  
00454     // Only objects that lie within this area will be printed.  It is possible for the actual print
00455     // area for a particular piece of paper to be smaller than the total print area.
00456     //
00457     // Currently, TotalPrintArea represents the entire spread bounds (the union of all pages on the spread)
00458     // On double page spreads, we could be printing left and/or right pages.
00459 
00460     DocRect TotalPrintArea;
00461 
00462     // The printable area on the paper
00463     DocRect PrintableArea;
00464     INT32   PALeftMargin;
00465     INT32   PATopMargin;
00466 
00467     DocCoord Origin;
00468 
00469     INT32   PageWidth;      // Width  of each printed page of the document (before scaling)
00470     INT32   PageHeight;     // Height of each printed page of the document (before scaling)
00471     INT32   PaperWidth;     // Width  of paper we are printing to
00472     INT32   PaperHeight;    // Height of paper we are printing to
00473 
00474     INT32   OrigPageWidth;  // Width  of each printed page ignoring print orientation
00475     INT32   OrigPageHeight; // Height of each printed page ignoring print orientation
00476 
00477     BOOL        DPS;            // TRUE if the document page is a double page spread
00478     MILLIPOINT  Bleed;          // The bleed margin for the spread
00479     MILLIPOINT  CropArea;       // The size of the crop area
00480 
00481     // Print layout vars
00482     BOOL            WholeSpread;
00483 
00484     FIXED16         Scale;
00485     PrintOrient     Orient;
00486 
00487     PrintFitType    FitType;
00488 
00489     INT32           TopMargin;      // Top  margin used in Custom fit
00490     INT32           LeftMargin;     // Left margin used in Custom fit
00491     INT32           ScaledWidth;    // Width  of each printed page (after scaling)
00492     INT32           ScaledHeight;   // Height of each printed page (after scaling)
00493     INT32           CropTopMargin;  // Crop top margin size used in Custom and Multi fit
00494     INT32           CropLeftMargin; // Crop left margin
00495 
00496     INT32           Rows;
00497     INT32           Columns;
00498     INT32           Gutter;
00499 
00500     // Print typeset vars
00501     TypesetInfo     Typesetting;    // Our typeset object.
00502     
00503     // Print output vars
00504     PrintLayers         Layers;
00505     PSLevel             PSLangLevel;
00506 //  PrintMethodType     PrintMethod;
00507     BitmapResMethod     BitmapResolutionMethod;
00508     INT32               DotsPerInch;
00509     PrintFillQuality    FillQuality;
00510     PrintTextOptions    TextOptions;
00511 
00512     // General print vars
00513     BOOL            Collated;
00514     INT32           NumCopies;
00515     BOOL            PrintToFile;
00516     PrintRangeObj   ObjPrintRange;
00517     PrintRangeDPS   DPSPrintRange;
00518 
00519     // Misc
00520     BOOL UpdateDependants;  // If TRUE, then setting certain members changes others, e.g. Setting Scale changes width, etc
00521 
00522     //-------------------------------
00523     // Private functions
00524 
00525     void SetScaleFactor(double ScaleFactor);        // Set scale percentage using a scale factor
00526     BOOL CalcPrintAreaVars(BOOL RedrawPrintBorders = TRUE);
00527 
00528     // Recalcs the scale factor and scaled width & height according to the current fit type
00529     // plus any other relevent settings, such as orientation, etc
00530     BOOL CalcFit();
00531 
00532     void CalcMultipleFit(INT32 NumRows,INT32 NumColumns,INT32 GutterVal,INT32 Wd,INT32 Ht,INT32 Extra);
00533     INT32 GetCropAdjust() const;
00534 
00535     double  CalcPatchWidth(INT32 PaperWidth,INT32 NumColumns,INT32 GutterVal);
00536     double  CalcPatchHeight(INT32 PaperHeight,INT32 NumRows,INT32 GutterVal);
00537     INT32   CalcMaxRows(INT32 GutterVal);
00538     INT32   CalcMaxColumns(INT32 GutterVal);
00539     INT32   CalcMaxGutter(INT32 NumRows,INT32 NumColumns);
00540 
00541     void    RenderRect(RenderRegion* pRRegion,DocRect Rect,BOOL Fill);
00542 };
00543 
00544 
00545 /********************************************************************************************
00546 
00547 >   class PrintPatchInfo: public CC_CLASS_MEMDUMP
00548 
00549     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00550     Created:    26/4/95
00551     Purpose:    This class encapsulates all the info required to print the next patch on the
00552                 current piece of paper
00553 
00554     SeeAlso:    PrintControl::GetNextPatch()
00555 
00556 ********************************************************************************************/
00557 
00558 class PrintPatchInfo : public CC_CLASS_MEMDUMP
00559 {
00560     CC_DECLARE_MEMDUMP(PrintPatchInfo)
00561 
00562     friend class PrintControl;
00563 
00564 public:
00565     PrintPatchInfo();
00566     ~PrintPatchInfo();
00567 
00568     // Note there are NO set functions. This is on purpose.
00569     DocRect     GetClipRect(BOOL AddBleed=FALSE, BOOL AddCropArea=FALSE) const;
00570     void        InflateRectBy(DocRect *pRect, BOOL AddBleed=FALSE, BOOL AddCropArea=FALSE) const;
00571     void        InflateRectBy(OilRect *pRect, BOOL AddBleed=FALSE, BOOL AddCropArea=FALSE) const;
00572     void        DeflateRectBy(DocRect *pRect, BOOL AddBleed=FALSE, BOOL AddCropArea=FALSE) const;
00573     MILLIPOINT  GetBleed() const;
00574     MILLIPOINT  GetCropArea() const;
00575 
00576 public:
00577     FIXED16     Scale;
00578     MILLIPOINT  XTrans;
00579     MILLIPOINT  YTrans;
00580     BOOL        Rotate;
00581     BOOL        SelectedOnly;
00582     BOOL        VisibleLayers;
00583     BOOL        EmulsionDown;
00584     Spread*     pSpread;
00585     MILLIPOINT  PaperWidth;
00586     MILLIPOINT  PaperHeight;
00587     INT32       ScaledWidth;
00588     INT32       ScaledHeight;
00589     INT32       PaperNumber;
00590     INT32       MaxPaperNumber;
00591     INT32       PatchNumber;
00592     INT32       MaxPatchNumber;
00593     INT32       PALeftMargin;
00594     INT32       PATopMargin;
00595 
00596 private:
00597     DocRect     ClipRect;
00598     MILLIPOINT  Bleed;
00599     MILLIPOINT  CropArea;
00600 
00601 };
00602 
00603 
00604 
00605 #endif // INC_PRINTCTL

Generated on Sat Nov 10 03:46:36 2007 for Camelot by  doxygen 1.4.4