1 // $Id: grndrgn.h 1361 2006-06-25 16:43:38Z alex $
2 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
3 ================================XARAHEADERSTART===========================
5 Xara LX, a vector drawing and manipulation program.
6 Copyright (C) 1993-2006 Xara Group Ltd.
7 Copyright on certain contributions may be held in joint with their
8 respective authors. See AUTHORS file for details.
10 LICENSE TO USE AND MODIFY SOFTWARE
11 ----------------------------------
13 This file is part of Xara LX.
15 Xara LX is free software; you can redistribute it and/or modify it
16 under the terms of the GNU General Public License version 2 as published
17 by the Free Software Foundation.
19 Xara LX and its component source files are distributed in the hope
20 that it will be useful, but WITHOUT ANY WARRANTY; without even the
21 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22 See the GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License along
25 with Xara LX (see the file GPL in the root directory of the
26 distribution); if not, write to the Free Software Foundation, Inc., 51
27 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33 Conditional upon your continuing compliance with the GNU General Public
34 License described above, Xara Group Ltd grants to you certain additional
37 The additional rights are to use, modify, and distribute the software
38 together with the wxWidgets library, the wxXtra library, and the "CDraw"
39 library and any other such library that any version of Xara LX relased
40 by Xara Group Ltd requires in order to compile and execute, including
41 the static linking of that library to XaraLX. In the case of the
42 "CDraw" library, you may satisfy obligation under the GNU General Public
43 License to provide source code by providing a binary copy of the library
44 concerned and a copy of the license accompanying it.
46 Nothing in this section restricts any of the rights you have under
47 the GNU General Public License.
53 This license applies to this program (XaraLX) and its constituent source
54 files only, and does not necessarily apply to other Xara products which may
55 in part share the same code base, and are subject to their own licensing
58 This license does not apply to files in the wxXtra directory, which
59 are built into a separate library, and are subject to the wxWindows
60 license contained within that directory in the file "WXXTRA-LICENSE".
62 This license does not apply to the binary libraries (if any) within
63 the "libs" directory, which are subject to a separate license contained
64 within that directory in the file "LIBS-LICENSE".
67 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
68 ----------------------------------------------
70 Subject to the terms of the GNU Public License (see above), you are
71 free to do whatever you like with your modifications. However, you may
72 (at your option) wish contribute them to Xara's source tree. You can
73 find details of how to do this at:
74 http://www.xaraxtreme.org/developers/
76 Prior to contributing your modifications, you will need to complete our
77 contributor agreement. This can be found at:
78 http://www.xaraxtreme.org/developers/contribute/
80 Please note that Xara will not accept modifications which modify any of
81 the text between the start and end of this header (marked
82 XARAHEADERSTART and XARAHEADEREND).
88 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
89 designs are registered or unregistered trademarks, design-marks, and/or
90 service marks of Xara Group Ltd. All rights in these marks are reserved.
93 Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
96 =================================XARAHEADEREND============================
101 // Created: 29/6/93 by Will
107 //#include "rndrgn.h" - in camtypes.h [AUTOMATICALLY REMOVED]
108 //#include "rendtype.h" - in camtypes.h [AUTOMATICALLY REMOVED]
109 //#include "winrect.h" - in camtypes.h [AUTOMATICALLY REMOVED]
110 //#include "ops.h" - in camtypes.h [AUTOMATICALLY REMOVED]
111 //#include "paths.h" - in camtypes.h [AUTOMATICALLY REMOVED]
112 #include "gdrawcon.h"
113 //#include "monotime.h" - in camtypes.h [AUTOMATICALLY REMOVED]
114 #include "GDrawIntf.h"
115 //#include "rrcaps.h" - in camtypes.h [AUTOMATICALLY REMOVED]
117 class GradFillAttribute
;
118 class BitmapFillAttribute
;
119 class BitmapTranspFillAttribute
;
121 class TranspGradTable
;
122 class OffscreenAttrValue
;
123 class ClipRegionAttribute
;
124 class CaptureManager
;
127 enum BitmapConvertHint
;
132 PALETTEENTRY palPalEntry
[256];
135 typedef CMapPtrToPtr ClipRegionMap
;
136 typedef CMapPtrToPtr ClipRectMap
;
138 #define USE_wxBITMAP 0
140 /********************************************************************************************
142 > class GRenderRegion : public RenderRegion
144 Author: Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
146 Purpose: Encapsulates rendering using Gavins routines (ie. into a bitmap).
147 This object is created when something needs rendering using Gavins routines
148 eg. When anti-aliasing.
149 See RenderRegion notes for more general details of this class. This is an
150 abstract class - see GRenderDIB or GRenderDDB for implementations.
152 ********************************************************************************************/
154 class GRenderRegion
: public RenderRegion
156 CC_DECLARE_DYNAMIC( GRenderRegion
)
158 friend class GBrush
; // so it can get to our vars etc
159 friend class OpGDraw
;
160 // friend class OpGFPU;
161 friend class GRenderRegionWrapper
;
162 friend class ConcurrentRenderer
;
163 friend class GDrawBorrower
;
167 GRenderRegion(); // do NOT use
168 GRenderRegion(DocRect ClipRegion
, Matrix ConvertMatrix
, FIXED16 ViewScale
, UINT32 Depth
, double dpi
);
169 virtual ~GRenderRegion();
173 // these are the virtual fns we need to instantiate a class
174 virtual BOOL
CopyRenderInfo( const RenderRegion
&Other
);
175 virtual BOOL
AttachDevice(View
*, wxDC
*, Spread
* = NULL
, bool fOwned
= false );
176 virtual BOOL
InitDevice();
180 virtual void SetClean(BOOL bResetChangedBounds
, BOOL FillWhite
);
181 virtual BOOL
IsClean() {return !HaveRenderedSomething
;}
183 void DrawPathToOutputDevice(Path
* PathToDraw
, PathShape shapePath
=PATHSHAPE_PATH
);
184 void DrawRect(DocRect
*RectToRender
);
185 void DrawDragRect(DocRect
*RectToRender
);
186 void DrawLine(const DocCoord
&StartPoint
, const DocCoord
&EndPoint
);
187 void DrawBlob(DocCoord p
, BlobType type
);
188 void DrawPixel(const DocCoord
&Point
);
189 void DrawCross(const DocCoord
&Point
, const UINT32 Size
);
191 void DrawBitmap(const DocCoord
&Point
, KernelBitmap
* pBitmap
);
192 void DrawBitmap(const DocCoord
&Point
, UINT32 BitmapID
, UINT32 ToolID
= NULL
);
193 void DrawBitmap(const DocRect
& rect
, KernelBitmap
* pBitmap
);
195 void DrawBitmapBlob(const DocCoord
&Point
, KernelBitmap
* BlobShape
) {}
196 void DrawBitmapBlob(const DocCoord
&Point
, ResourceID resID
) {}
198 void DrawFixedSystemText(StringBase
*TheText
, DocRect
&BoundsRect
, UINT32 uFormat
= DEFAULT_TEXT_FORMATTING
);
199 void SetFixedSystemTextColours(DocColour
*TextCol
, DocColour
*Background
);
200 void GetFixedSystemTextSize(StringBase
*TheText
, DocRect
*BoundsRect
, double* atDpi
= NULL
);
203 void InitAttributes();
204 void SetLineAttributes();
205 void SetFillAttributes();
206 void SetOSDrawingMode();
207 void SetQualityLevel();
209 void Restore(RenderRegion
*);
211 BOOL
RenderGradFillPath(Path
*, GradFillAttribute
* );
213 BOOL
RenderBitmapFill (Path
*, BitmapFillAttribute
* );
215 virtual void SetSolidColours(BOOL SetSolid
);
217 //static public functions
218 static RenderRegion
* Create(DocRect ClipRegion
, Matrix ConvertMatrix
, FIXED16 ViewScale
,
219 RenderType
, View
* pView
= NULL
, BOOL bForce32BPP
= FALSE
);
220 static BOOL
Init(BOOL
);
221 static void DeInit();
222 static BOOL
CalcBlitMode( INT32 Wanted
);
224 GDrawContext
*GetDrawContext() const
229 static GDrawContext
* SetTempDrawContext(GDrawContext
* pContext
)
231 // Bad things will happen if we set this to NULL
232 if (pContext
== NULL
)
234 TRACEUSER( "Gerry", _T("******** Trying to set a NULL GDrawContext\n") );
238 GDrawContext
* pOldCon
= GD
;
240 // TRACEUSER( "Gerry", _T("GDraw context set to 0x%08x (prev = 0x%08x)\n"), GD, pOldCon);
244 static GDrawContext
*GetStaticDrawContext()
247 if (GDrawAsm::GetContextForCurrentThread() != NULL
)
248 return(GDrawAsm::GetContextForCurrentThread());
254 static GDrawContext
*GetStaticDrawContext(INT32 DitherType
)
257 if (GDrawAsm::GetContextForCurrentThread() != NULL
)
258 return(GDrawAsm::GetContextForCurrentThread());
261 if ((DitherType
== 0) || (DitherType
== 3))
262 return(ErrorDiffContext
);
267 static INT32
GetDefaultTransparency() { return WhichTransparency
; }
269 static UINT32
SetPaletteEntries( LPBITMAPINFO lpBmi
, wxDC
* pOutputDC
= NULL
);
271 // Used to calculate the size of the render region required
272 virtual WinRect
CalculateWinRect( Matrix
& RenderMatrix
, const DocRect
& docrect
,
274 // let's non-renderregion code determine pixel dimensions of bounding boxes
275 virtual WinRect
CalculateWinRect( const DocRect
& docrect
);
277 void SetDeepDIB(BOOL Value
);
280 // call to get the 32bit bitmap just to read it with no conversion going on
281 // used when gathering stats for the palette
282 const RGBQUAD
* Get32BitRGBQuadData(){ return (RGBQUAD
*)pBits
;}
283 UINT32
GetSizeOfRGBQuadData() { return pBitmapInfo
? pBitmapInfo
->bmiHeader
.biWidth
* pBitmapInfo
->bmiHeader
.biHeight
: 0; }
285 void SetDoCompression(BOOL bDoCompression
) { m_DoCompression
= bDoCompression
; }
287 void SetDoBitmapConversion(BOOL bEnable
) { m_bEnableConversion
= bEnable
; }
289 DocRect
GetChangedRect();
291 void SetBitmapPointers(LPBITMAPINFO bi
, LPBYTE by
);
292 BOOL
GetBitmapPointers(LPBITMAPINFO
* ppInfo
, LPBYTE
* ppBits
, BOOL bCorrectTransparency
= TRUE
);
296 static GDrawContext
*pRealGD
; // ptr to GDraw we want to use
297 static GDrawContext
*GD
; // ptr to GDraw we want to use
298 static GDrawContext
*ErrorDiffContext
; // ptr to special context for error diffusion
300 GMATRIX CurrentGMatrix
;
302 GMATRIX
SetGavinMatrix(GMATRIX
* GMatrix
);
303 virtual GMATRIX
MakeGavinMatrix(Matrix NewRenderMatrix
, DocRect ClipRect
, double PixelsPerInch
, BOOL bMasterCapture
);
304 virtual double GetPixelsPerInch() {return PixelsPerInch
;}
306 MILLIPOINT
CalcPixelWidth();
307 double CalcPixelWidthDouble();
308 MILLIPOINT
CalcScaledPixelWidth();
309 double CalcScaledPixelWidthDouble();
314 double GetScaledPixelWidthDouble();
315 void SetSimulatePrinting(UINT32 PrintType
);
316 virtual void GetRenderRegionCaps(RRCaps
* pCaps
);
318 // Function to draw a bitmap into the render region using a mask, and
319 // and equivalent function to do the same, only colour separating it as it goes
320 // The Separated version is called by this one if colour seps are enabled
321 virtual SlowJobResult
DrawMaskedBitmap(const DocRect
&Rect
, KernelBitmap
* pBitmap
,
322 MaskedRenderRegion
* pMask
, ProgressDisplay
*Progress
);
324 BOOL
GetTransparencyFill(TranspGradTable
*, DWORD
*);
326 virtual BOOL
DrawArrowHead(ArrowRec
&ArrowToDraw
, DocCoord
&Centre
, DocCoord
&Direction
);
328 BOOL
SetBitmapTransparencyFill(TranspFillAttribute
*, DWORD
*, TranspGradTable
*);
330 // LPBYTE m_pTempTransparencyBMPBits; // member variable that may get set up in SetBitmapTransparencyFill and needs freeing later
333 BOOL
SetFractalFill(ColourFillAttribute
*, DWORD
*);
334 BOOL
SetFractalTransparencyFill(TranspFillAttribute
*, DWORD
*);
336 // these are pure virtual fns that must be instantiated in all derived classes,
337 // together with the multiple paramter constructor and destructor.
338 virtual LPBITMAPINFO
GetLPBits( INT32 Width
, INT32 Height
, INT32 Depth
, LPBYTE
*) = 0;
339 virtual void FreeLPBits( LPBITMAPINFO
, LPBYTE
) = 0;
340 virtual BOOL
DisplayBits(LPBITMAPINFO lpDisplayBitmapInfo
= NULL
, LPBYTE lpDisplayBits
= NULL
) = 0;
342 // this isn't pure, but is needed by some inherited classes
343 virtual void InitBmpBits(); // added by Ilan.
344 virtual BOOL
StartRenderAfter(GMATRIX
*);
345 virtual BOOL
StartRenderMiddle();
346 virtual void DisplayCurrentState();
348 // these are the member variables
349 LPBITMAPINFO pBitmapInfo
; // ptr to BITMAPINFO
350 LPBYTE pBits
; // ptr to actual bytes (or NULL)
351 // INT32 uBitmapSize; // size of above
352 UINT32 uBitmapDepth
; // in bits/pixel
357 wxAlphaPixelData
* pBitmapData
; // Used to obtain and maintain lpBits.
359 LPBITMAPINFO
AllocWxBitmap( UINT32 Width
, UINT32 Height
, UINT32 Depth
);
363 wxRect WRect
; // its position in the owner window
364 wxRect ScreenRect
; // its position in the whole screen bitmap
366 double PixelsPerInch
; // resolution of bitmap
367 double dScaledPixelWidth
; // accurate size of pixel with view zoom factored in
369 wxPalette
* hPalette
; // palette used to render (or NULL)
370 wxPalette
* hPrevPalette
; // original (previous) palette
372 BOOL LocalBitmap
; // TRUE if this bitmap is a little one,
373 // FALSE if its a chunk of ScreenBitmap
374 BOOL UseSolidColours
;
376 BOOL m_bForceBitmapSmoothing
; // TRUE to enforce smoothing of all rendered bitmaps
377 // ; req'd by shadowing framework.
378 BOOL m_bEnableConversion
;
379 BOOL ForceInitBmpBits
; // Set when in-place conversion of RGBA bitmap invalidates it
381 INT32 DitherStyle8Bit
; // DitherStyle for 8 bit rendering
383 BOOL HaveRenderedSomething
; // TRUE if drawing has occurred
385 UINT32 m_ForcePrintingCaps
;
387 void Display1to1Bitmap();
388 void DisplayLtoHBitmap();
389 void DisplayHto8Bitmap();
391 void PlotBitmap( UINT32 ColourFlag
);
392 void PlotBitmap( wxDC
*pDC
, UINT32 ColourFlag
, INT32 Left
, INT32 Top
, UINT32 Width
, UINT32 Height
, wxPalette
* hPal
, INT32
, INT32
);
394 static LPBYTE
StaticPlotBitmap( wxDC
*pDC
, UINT32 ColourFlag
, LPBITMAPINFO lpBitmapInfo
, LPBYTE lpBits
, INT32 Left
, INT32 Top
, UINT32 Width
, UINT32 Height
, wxPalette
* hPal
, INT32
, INT32
);
396 // KernelBitmap* FractalBitmap; // GAT: Never used.
398 // Limit of transparency in hit-detect pixels before pixel will be ignored
399 static UINT32 ClickTranspLimit
;
401 // Whether to use high-quality anti-aliasing or not
402 static BOOL HighQualityAA
;
404 // Bitmap conversion algorithm for show printer colours
405 static INT32 BitmapConversion
;
408 // Allows you to override the normal checks which are made when deciding
409 // whether to smooth a bitmap or not; if we're rendering at full quality
410 // and the bitmap will let us, then we _will_ render it with smoothing.
411 void SetForceBitmapSmoothing(BOOL ForceSmoothing
) { m_bForceBitmapSmoothing
= ForceSmoothing
; }
412 BOOL
IsForcingBitmapSmoothing() { return m_bForceBitmapSmoothing
; }
415 BOOL
SetGCol( DocColour
& ) const;
416 BOOL
SetFillGCol( DocColour
& ) const;
418 DocCoord
DocCoordToG(const DocCoord
& DocPoint
);
419 void DocCoordToG( DocCoord
*DocPoint
);
420 BOOL
StrokePath( const DocCoord
*, const PathVerb
*, UINT32
,
421 const DocCoord
*, const PathVerb
*, UINT32
, BOOL DrawArrows
= FALSE
);
425 // don't make these into bitfields, as they get setup by the preferences code which
426 // won't be able to cope
427 static BOOL WantDoGDraw
; // TRUE if user wants it
428 static UINT32 WantGDrawDepth
; // desired depth of off-screen bitmap
429 // static BOOL WantNoPalette; // TRUE if palette switching not wanted
430 // static UINT32 WantBlitMode; // 0=auto, 1=Stretch, 2=SetDIB, 3=BitBlt
431 static BOOL WantHighColourDirect
; // TRUE if deep sprite plots directly
432 static BOOL WantDeepGDraw
; // TRUE for 32-bit bitmaps
433 // static BOOL WantWinG; // TRUE to use WinG if poss
434 static INT32 WhichPalette
;
435 static INT32 WhichDither
;
436 static INT32 WhichTransparency
;
437 static INT32 ViewDither
; // GDraw dither style used for Views
439 static BOOL CanDoGDraw
; // TRUE if it is physically permitted
440 // GAT: Set if GDraw initialises OK.
441 static BOOL CanDoPalIndices
; // TRUE if GDI does DIB_PAL_INDICES
442 static BOOL CanSetPalette
; // TRUE if screen has palette support
443 // static BOOL CanDoDeepDIBs;
445 static INT32 ScreenDepth
; // in bits/pixel
446 static INT32 ScreenWidth
; // in pixels
447 static INT32 ScreenHeight
; // in pixels
448 static INT32 LogPixelsX
;
449 static INT32 LogPixelsY
;
452 // static LPBITMAPINFO ScreenBitmap; // NULL if none
453 // static LPBYTE ScreenBits; // bitmap memory for above
455 static LPRGBQUAD Fixed256Palette
; // NULL if not fixed palette (256 cols only)
456 // static BOOL RealFPU;
457 static BitmapConvertHint ScreenHinting
; // used for hinting bitmap conversion
459 static INT32 LastPaletteFlag
; // last value passed to GDraw_SelectPalette
461 static RealLogPalette ErrorDiffPalette
; // static LOGPALETTE structure for error diffusion
464 static void UpdateErrorDiffPalette(void);
467 // static INT32 MaxGMemory; // largest allocation allowed (0=no limit)
468 // static UINT32 MaxGMemoryInK; // the above in Kbytes
469 // static INT32 FreeGMemory; // how much left to allocate
473 static const LOGPALETTE
* GetRecommendedPalette();
474 // static void PlotBitmap( wxDC *pDC, UINT32 ColourFlag, LPBITMAPINFO lpBitmapInfo, LPBYTE lpBits, INT32 Left, INT32 Top, INT32 Width, INT32 Height, wxPalette* hPal, INT32, INT32 );
475 static BOOL
StrokePathAvailable();
476 static INT32
StrokePathToPath(
477 CONST DocCoord
*IPoints
,
478 CONST BYTE FAR
*ITypes
,
486 LineCapType LineCaps
,
488 CONST DashType
*Dash
);
489 static void GColInit( wxDC
*, BOOL
= FALSE
);
490 static void PaletteHasChanged();
491 static void EnsurePalette(INT32 PaletteFlag
);
492 static LPLOGPALETTE
GetErrorDiffPalette(void)
494 return((LPLOGPALETTE
)&ErrorDiffPalette
);
497 static void SetViewDither(INT32 dither
){ViewDither
= dither
;};
499 static DWORD
GetMaxBitmapWidth(void);
500 static DWORD
GetMaxBitmapDepth(void);
501 static INT32
GetDefaultDPI()
507 void SetDitherStyle8Bit(INT32 DitherStyle
)
509 DitherStyle8Bit
= DitherStyle
;
512 // banding and mergeing with offscreen rendering system
513 virtual void ResetRegion(DocRect
&NewClipRect
);
516 void FreeOffscreenState();
519 virtual void SetOffscreen(OffscreenAttrValue
*);
520 virtual void RestoreOffscreen(OffscreenAttrValue
*);
521 BOOL
RenderBitmapWithTransparency(
523 BitmapFillAttribute
*,
524 BitmapTranspFillAttribute
*
526 virtual BOOL
IsWrappedRender() const {return IsWrapped
;}
527 virtual BOOL
TranspTypeIsRGBTCompatible(UINT32 ttype
) const; // Should be TranspType ttype
528 TransparencyEnum
MapTranspTypeToGDraw(UINT32 ttype
, BOOL bGraduated
) const;
531 /////////////////////////////////////////////////////////////////////
533 // New Capture system
536 virtual Capture
* StartCapture(CCObject
* pOwner
,
539 BOOL bTransparent
= TRUE
,
540 BOOL bCaptureBackground
= FALSE
,
541 double mpPixelWidth
= 0,
542 NodeRenderableInk
* pDirectSupplier
= NULL
544 virtual BOOL
StopCapture(CCObject
* pOwner
,
546 BOOL bReleaseBitmap
= FALSE
,
547 LPBITMAPINFO
* plpBitmapInfo
= NULL
,
548 LPBYTE
* plpBits
= NULL
,
549 DocRect
* pCaptureRect
= NULL
,
550 Matrix
* pmatTransform
= NULL
,
551 double* pdResolution
= NULL
553 virtual BOOL
ChangeCapture(CAPTUREINFO cinfo
,
554 BOOL bTransparent
= TRUE
,
555 BOOL bCaptureBackground
= FALSE
557 // virtual INT32 GetCaptureDepth() {return m_CaptureStack.Size();}
558 virtual BOOL
MasterCaptureIsCurrent() const {return (!m_CaptureStack
.Empty() && GetTopCaptureBitmap() && GetTopCaptureBitmap()->IsMaster());}
559 // virtual Capture* GetTopCapture() const {return m_CaptureStack.Empty() ? NULL : m_CaptureStack.Top();}
560 // virtual Capture* GetMasterCapture() const {return m_CaptureStack.Empty() ? NULL : m_CaptureStack.Bottom();}
561 virtual BOOL
RenderCurrentCaptureState(BOOL bStartFromMaster
= FALSE
);
562 virtual Capture
* GetTopCaptureBitmap(Capture
* pFromCapture
= NULL
) const;
563 virtual BOOL
TopCaptureIsDirect() {return (GetTopCapture() && GetTopCapture()->IsDirect());}
565 // Internal worker functions
567 virtual BOOL
SetRenderToCapture(Capture
* pCapture
, BOOL bApplyClipRegion
= FALSE
, BOOL bSetBitmap
= TRUE
);
568 virtual BOOL
SetupDirectCapture(Capture
* pNewCapture
, NodeRenderableInk
* pSupplier
);
572 // StackT<Capture*> m_CaptureStack;
575 /////////////////////////////////////////////////////////////////////
576 // Additional stuff for GRenderRegionWrapper (affects how bmp mem is allocated)
579 void SetIsWrapped(BOOL flag
) { IsWrapped
= flag
; }
581 /////////////////////////////////////////////////////////////////////////////////////////
583 // Implementation of clipping within a GRenderRegion.
585 virtual void SetClipRegion (ClipRegionAttribute
* pClipAttr
, BOOL Temp
);
586 virtual void RestoreClipRegion (ClipRegionAttribute
* pClipAttr
, BOOL Temp
);
589 // ClipRegionMap m_ClipRegionMap;
592 const REGION
* MakeClipRegionFromClipAttr(ClipRegionAttribute
* pClipAttr
);
593 BOOL
ApplyCurrentClipRegion();
594 void FreeStoredClipRegions();
595 /////////////////////////////////////////////////////////////////////////////////////////
598 void OffsetByHalfPixel();
599 virtual BOOL
GrabBitmap(DocRect
* rectGrab
, LPBITMAPINFO
* plpBitmapInfo
, LPBYTE
* plpBits
);
602 virtual void DebugTrace();
603 BOOL
DumpCaptureStack();
607 // Andy Hills, 23-10-00:
608 // Helper functions for RenderBitmapFill and SetBitmapTransparencyFill
609 BOOL
IsScaledUp(FillGeometryAttribute
*Fill
);
610 BOOL
IsAt100Percent(FillGeometryAttribute
*Fill
);
611 BOOL
IsDistorted(FillGeometryAttribute
*Fill
);
612 BOOL
NeedToSmooth(FillGeometryAttribute
*Fill
,BOOL bAlreadyScaled
);
613 virtual BOOL
SetSmoothingFlags(FillGeometryAttribute
*Fill
);
620 /******************************************************************************************
622 > class OpGDraw : public Operation
624 Author: Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
626 Purpose: Operation to toggle gdraw setting
627 Notes: Will be on a dialog somewhere eventually
629 ********************************************************************************************/
631 class OpGDraw
: public Operation
633 CC_DECLARE_DYNCREATE( OpGDraw
)
638 void Do(OpDescriptor
*);
641 static OpState
GetState(String_256
*, OpDescriptor
*);
644 #define OPTOKEN_GDRAW _T("GDrawToggle")
646 // We now always have CDraw (which pretends to be GDraw)
647 //#define REAL_GDRAW 1
649 // the possibility of nasty DDBs is only available on Intel platforms. It is permitted on
650 // Intel 16-bit for test purposes