InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DVOffscreenGraphicsContext.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: jargast
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __DVOffscreenGraphicsContext__
25 #define __DVOffscreenGraphicsContext__
26 
27 #include "IGraphicsContext.h"
28 #include "PMMatrix.h"
29 
30 class IControlView;
31 class IViewPort;
32 class ITransform;
33 class IGraphicsContext;
34 
49 {
50 public:
51 
52  // ----- Initialization -----
53  DVOffscreenGraphicsContext(IViewPort* viewPort, const PMMatrix& toWindowMatrix, IControlView* iView, SysRgn clipRgnInWinCoords = nil);
54  virtual ~DVOffscreenGraphicsContext();
55 
56  // ----- Clipping -----
57 
58  virtual SysRgn GetClip() const;
59  virtual SysRgn GetOriginAdjustedClip() const;
60 
61  // ----- Accessors -----
62 
68  virtual SysPort GetSysPort() const;
69 
70  virtual IViewPort* GetViewPort() const;
71  virtual const PMMatrix& GetContentToViewTransform() const;
72  virtual const PMMatrix& GetViewToContentTransform() const;
73  virtual IControlView* GetView() const;
74 
75  bool16 IsCurrent() const;
76 
77  virtual dvaui::drawbot::Drawbot* GetDrawbot() const;
78 
79 private:
80  PMMatrix fToWindowMatrix;
81  PMMatrix fFromWindowMatrix;
82  PMMatrix fOldTransform;
83 
84  IViewPort* fViewPort;
85  IControlView* fView;
86 
87  SysRgn fClipRgnInWinCoords;
88 };
89 
90 #endif