CFx SDK Documentation  2023 SP0
FxVectorizeDevice.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2022 by Graebert GmbH.
3 //
4 // Permission to use, copy, modify, and distribute this software in
5 // object code form for any purpose and without fee is hereby granted,
6 // provided that the above copyright notice appears in all copies and
7 // that both that copyright notice and the limited warranty and
8 // restricted rights notice below appear in all supporting
9 // documentation.
10 //
11 // GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12 // GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15 // UNINTERRUPTED OR ERROR FREE.
16 
17 #pragma once
18 
19 #include "FxPragmaPush.h"
20 
21 #include "DDKERNEL.h"
22 
23 #include <Gs/GsBaseVectorizer.h>
24 
25 #include <DbGsManager.h>
26 
27 class CFxView;
28 class CFxDatabase;
29 class CFxDeviceReactor;
30 class CFxViewDrawContext;
31 class CFxViewDrawInfo;
32 class QImage;
33 class CFxPicture;
34 class OdDbPlotSettings;
35 
42 {
43  friend class CFxViewImpl;
44 public:
46 
49 
51  ~CFxVectorizeDevice() override;
52 
57  virtual CFxViewDrawContext* CreateDrawContext( int iRenderEngine, void* pParam, int iRenderMode ) const = 0;
58 
64 
68  virtual double GetDeviceWidth() const = 0;
69 
73  virtual double GetDeviceHeight() const = 0;
74 
80  virtual bool InitializeLayout( const OdDbObjectId& idLayout ) = 0;
81 
87  virtual void DestroyLayout() = 0;
88 
94  virtual void Update( double width, double height, bool bAttachDatabase ) = 0;
95 
100  virtual CFxDatabase* GetFxDatabase() = 0;
101 
106  virtual const CFxDatabase* GetFxDatabase() const = 0;
107 
112  virtual void AddDeviceReactor( CFxDeviceReactor* pReactor ) = 0;
113 
118  virtual void RemoveDeviceReactor( CFxDeviceReactor* pReactor ) = 0;
119 
124  virtual int GetCurrentRenderEngine() const = 0;
125 
130  virtual OdDbObjectId GetLayoutId() const = 0;
131 
135  virtual void SetPalette(const ODCOLORREF* pPalette) = 0;
136 
140  virtual const ODCOLORREF* GetPalette() const = 0;
141 
145  virtual void SetBackground(ODCOLORREF color) = 0;
146 
150  virtual void SetBackground(ODCOLORREF color, bool usePlotPalette) = 0;
151 
155  virtual ODCOLORREF GetBackground() const = 0;
156 
160  virtual ODCOLORREF GetForeground() const = 0;
161 
165  virtual CFxView* GetActiveFxView() = 0;
166 
170  virtual const CFxView* GetActiveFxView() const = 0;
171 
176  virtual CFxView* GetFxViewByCadWindowId( OdInt16 number ) = 0;
177 
184 
188  virtual CFxView* HitTest( const OdGsDCPoint& ptInput ) = 0;
189 
192  virtual bool IsRegeneration() const = 0;
193 
196  virtual void SetRegeneration( bool bRegen ) = 0;
197 
200  virtual void InvalidateGeometry() = 0;
201 
204  virtual double GetPixelPerMM() const = 0;
205 
208  virtual void AdjustBeforeUpdate(CFxViewDrawContext &ctx, CFxViewDrawInfo& rDrawInfo, CFxView &view) = 0;
209 
213  static void GetModelLineWeights( OdUInt8Array& lweights, double scale );
214 
218  virtual bool GetPlotArea(OdGsDCRectDouble *out = 0) = 0;
219 
223  virtual void SetPlotArea(const OdGsDCRectDouble& area) = 0;
224 
227  virtual void SetUsePlotTransparency( bool value ) = 0;
228  virtual bool UsePlotTransparency() const = 0;
229 
230 protected:
231  virtual void destroyView( OdGsView* pView ) = 0;
232 
233  virtual void BeginDeviceUpdate(){};
234  virtual void EndDeviceUpdate(){};
235 
236  friend class CFxViewDrawInfo;
237 
238 public:
239  virtual bool IsInitialUpdate() const = 0;
240 };
241 
243 
244 #include "FxPragmaPop.h"
#define DDKERNEL_API
Definition: DDKERNEL.h:32
scale
Definition: DimVarDefs.h:1684
OdSmartPtr< CFxVectorizeDevice > CFxVectorizeDevicePtr
#define ODCOLORREF
Definition: OdPlatform.h:883
short OdInt16
virtual ODCOLORREF GetBackground() const =0
virtual void SetRegeneration(bool bRegen)=0
~CFxVectorizeDevice() override
virtual const CFxView * GetActiveFxView() const =0
static void GetModelLineWeights(OdUInt8Array &lweights, double scale)
virtual double GetPixelPerMM() const =0
ODRX_DECLARE_MEMBERS(CFxVectorizeDevice)
virtual void AdjustBeforeUpdate(CFxViewDrawContext &ctx, CFxViewDrawInfo &rDrawInfo, CFxView &view)=0
virtual CFxDatabase * GetFxDatabase()=0
virtual CFxView * GetActiveFxView()=0
virtual void SetUsePlotTransparency(bool value)=0
virtual void DestroyLayout()=0
virtual CFxViewDrawContext * CreateDrawContext(int iRenderEngine, void *pParam, int iRenderMode) const =0
virtual void Update(double width, double height, bool bAttachDatabase)=0
virtual bool GetPlotArea(OdGsDCRectDouble *out=0)=0
virtual bool IsRegeneration() const =0
virtual void SetPalette(const ODCOLORREF *pPalette)=0
virtual void SetPlotArea(const OdGsDCRectDouble &area)=0
virtual bool InitializeLayout(const OdDbObjectId &idLayout)=0
virtual const CFxDatabase * GetFxDatabase() const =0
virtual void SetBackground(ODCOLORREF color)=0
virtual void destroyView(OdGsView *pView)=0
virtual void SetBackground(ODCOLORREF color, bool usePlotPalette)=0
virtual ODCOLORREF GetForeground() const =0
virtual CFxView * GetFxViewByCadWindowId(OdInt16 number)=0
virtual void InvalidateGeometry()=0
virtual bool IsInitialUpdate() const =0
virtual bool UsePlotTransparency() const =0
virtual void BeginDeviceUpdate()
virtual OdDbObjectId GetLayoutId() const =0
virtual void DestroyDrawContext(CFxViewDrawContext *)
virtual double GetDeviceWidth() const =0
virtual CFxView * GetPaperSpaceOverallView()=0
virtual void RemoveDeviceReactor(CFxDeviceReactor *pReactor)=0
virtual void AddDeviceReactor(CFxDeviceReactor *pReactor)=0
virtual double GetDeviceHeight() const =0
virtual int GetCurrentRenderEngine() const =0
virtual const ODCOLORREF * GetPalette() const =0
virtual void EndDeviceUpdate()
virtual CFxView * HitTest(const OdGsDCPoint &ptInput)=0
Definition: Gs.h:133
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
GLsizei const GLfloat * value
Definition: gles2_ext.h:302