CFx SDK Documentation  2020SP3
FxVectorizeDevice.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2020 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"
FxPragmaPop.h
CFxVectorizeDevice::DestroyLayout
virtual void DestroyLayout()=0
CFxVectorizeDevice::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(CFxVectorizeDevice)
CFxVectorizeDevice::HitTest
virtual CFxView * HitTest(const OdGsDCPoint &ptInput)=0
CFxVectorizeDevice::SetBackground
virtual void SetBackground(ODCOLORREF color, bool usePlotPalette)=0
CFxVectorizeDevice::GetCurrentRenderEngine
virtual int GetCurrentRenderEngine() const =0
scale
scale
Definition: DimVarDefs.h:1684
OdGsView
Definition: Gs.h:133
CFxVectorizeDevice::GetDeviceWidth
virtual double GetDeviceWidth() const =0
OdGsDCRectDouble
Definition: GsDefs.h:242
CFxDatabase
Definition: FxDatabase.h:48
CFxVectorizeDevice::InitializeLayout
virtual bool InitializeLayout(const OdDbObjectId &idLayout)=0
CFxVectorizeDevice::IsRegeneration
virtual bool IsRegeneration() const =0
CFxVectorizeDevice::GetFxDatabase
virtual CFxDatabase * GetFxDatabase()=0
OdDbObjectId
Definition: DbObjectId.h:99
OdGsDevice
Definition: Gs.h:1061
CFxVectorizeDevice::GetLayoutId
virtual OdDbObjectId GetLayoutId() const =0
CFxPicture
Definition: FxPicture.h:37
CFxViewDrawInfo
Definition: FxViewDrawInfo.h:47
CFxVectorizeDevice::~CFxVectorizeDevice
~CFxVectorizeDevice() override
OdGsDCPoint
Definition: GsDefs.h:53
DDKERNEL.h
OdArray< OdUInt8, OdMemoryAllocator< OdUInt8 > >
CFxVectorizeDevice::GetFxDatabase
virtual const CFxDatabase * GetFxDatabase() const =0
CFxVectorizeDevice::UsePlotTransparency
virtual bool UsePlotTransparency() const =0
OdInt16
short OdInt16
Definition: OdPlatformSettings.h:756
CFxVectorizeDevice::GetActiveFxView
virtual const CFxView * GetActiveFxView() const =0
CFxVectorizeDevice::BeginDeviceUpdate
virtual void BeginDeviceUpdate()
Definition: FxVectorizeDevice.h:233
GsBaseVectorizer.h
CFxVectorizeDevice::IsInitialUpdate
virtual bool IsInitialUpdate() const =0
CFxVectorizeDevice
Definition: FxVectorizeDevice.h:42
CFxViewDrawContext
Definition: FxViewDrawContext.h:39
CFxVectorizeDevice::GetForeground
virtual ODCOLORREF GetForeground() const =0
CFxVectorizeDevice::SetPlotArea
virtual void SetPlotArea(const OdGsDCRectDouble &area)=0
CFxVectorizeDevice::GetBackground
virtual ODCOLORREF GetBackground() const =0
OdSmartPtr
Definition: SmartPtr.h:58
CFxVectorizeDevice::AdjustBeforeUpdate
virtual void AdjustBeforeUpdate(CFxViewDrawContext &ctx, CFxViewDrawInfo &rDrawInfo, CFxView &view)=0
CFxVectorizeDevice::EndDeviceUpdate
virtual void EndDeviceUpdate()
Definition: FxVectorizeDevice.h:234
OdDbPlotSettings
Definition: DbPlotSettings.h:41
CFxVectorizeDevice::Update
virtual void Update(double width, double height, bool bAttachDatabase)=0
CFxVectorizeDevice::SetBackground
virtual void SetBackground(ODCOLORREF color)=0
CFxVectorizeDevice::SetRegeneration
virtual void SetRegeneration(bool bRegen)=0
height
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
width
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
DDKERNEL_API
#define DDKERNEL_API
Definition: DDKERNEL.h:32
CFxVectorizeDevice::CFxVectorizeDevice
CFxVectorizeDevice()
CFxVectorizeDevice::GetPaperSpaceOverallView
virtual CFxView * GetPaperSpaceOverallView()=0
CFxView
Definition: FxView.h:265
CFxVectorizeDevice::GetModelLineWeights
static void GetModelLineWeights(OdUInt8Array &lweights, double scale)
CFxVectorizeDevice::DestroyDrawContext
virtual void DestroyDrawContext(CFxViewDrawContext *)
CFxVectorizeDevice::GetPlotArea
virtual bool GetPlotArea(OdGsDCRectDouble *out=0)=0
DbGsManager.h
CFxVectorizeDevice::SetUsePlotTransparency
virtual void SetUsePlotTransparency(bool value)=0
CFxVectorizeDevice::GetPixelPerMM
virtual double GetPixelPerMM() const =0
CFxVectorizeDevice::GetFxViewByCadWindowId
virtual CFxView * GetFxViewByCadWindowId(OdInt16 number)=0
CFxVectorizeDevice::GetDeviceHeight
virtual double GetDeviceHeight() const =0
CFxVectorizeDevice::AddDeviceReactor
virtual void AddDeviceReactor(CFxDeviceReactor *pReactor)=0
CFxVectorizeDevice::CreateDrawContext
virtual CFxViewDrawContext * CreateDrawContext(int iRenderEngine, void *pParam, int iRenderMode) const =0
value
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
ODCOLORREF
#define ODCOLORREF
Definition: OdPlatform.h:883
CFxDeviceReactor
Definition: FxDeviceReactor.h:31
CFxVectorizeDevice::RemoveDeviceReactor
virtual void RemoveDeviceReactor(CFxDeviceReactor *pReactor)=0
FxPragmaPush.h
CFxVectorizeDevice::destroyView
virtual void destroyView(OdGsView *pView)=0
CFxVectorizeDevice::SetPalette
virtual void SetPalette(const ODCOLORREF *pPalette)=0
CFxVectorizeDevice::GetActiveFxView
virtual CFxView * GetActiveFxView()=0
CFxVectorizeDevice::GetPalette
virtual const ODCOLORREF * GetPalette() const =0
CFxVectorizeDevice::InvalidateGeometry
virtual void InvalidateGeometry()=0
CFxVectorizeDevicePtr
OdSmartPtr< CFxVectorizeDevice > CFxVectorizeDevicePtr
Definition: FxVectorizeDevice.h:242