FLImaging 6.12.24.4
GUIViewImageLayerObjectBase.h
1#pragma once
2
3#include "DefinitionsGUI.h"
4#include <d2d1.h>
5
6#define DAFAULT_FONTSIZE 12
7
8namespace FLImaging
9{
10 namespace GUI
11 {
12 class CD2DObject;
13
14 enum ELayerObjectType : uint32_t
15 {
16 ELayerObjectType_Base = 0x0000,
17 ELayerObjectType_Figure = 0x0001,
18 ELayerObjectType_Text = 0x0002,
19
20 ELayerObjectType_Figure_Gbr = 0x0011,
21 ELayerObjectType_Figure_Dxf = 0x0021,
22 };
23
24 // `CGUIViewImageLayerObjectFigureRef`, `CGUIViewImageLayerObjectTextRef` 객체에서 참조하는 객체의 타입
25 // The type of the object referenced in the `CGUIViewImageLayerObjectFigureRef`, `CGUIViewImageLayerObjectTextRef` object
26 enum EGUIVILOReferencedObjectType
27 {
28 EGUIVILOReferencedObjectType_Unknown = 0,
29 EGUIVILOReferencedObjectType_CGUIViewImageObjectFigure,
30 EGUIVILOReferencedObjectType_CGUIViewImageObjectImageFigure,
31 EGUIVILOReferencedObjectType_CFLBase,
32 };
33
34 class FL_EXPORT CGUIViewImageLayerObjectBase
35 {
36 public:
37 CGUIViewImageLayerObjectBase();
38 CGUIViewImageLayerObjectBase(const CGUIViewImageLayerObjectBase* pRhs);
39 CGUIViewImageLayerObjectBase(const CGUIViewImageLayerObjectBase& rhs);
40 virtual ~CGUIViewImageLayerObjectBase();
41
42 virtual const CResult Assign(const CGUIViewImageLayerObjectBase* pRhs);
43 virtual const CResult Assign(const CGUIViewImageLayerObjectBase& rhs);
44 virtual CGUIViewImageLayerObjectBase* DuplicateObject() const;
45 virtual CGUIViewImageLayerObjectBase* CreateObject() const;
46
47 virtual void Clear();
48 virtual void ClearFigure();
49
50 virtual bool SetFigure(const Foundation::CFLFigure& flfFigure);
51 virtual bool SetFigure(const Foundation::CFLFigure* pFlfFigure, bool bRefFigure = false);
52 Foundation::CFLFigure* GetFigure() const;
53
54 virtual void SetLineColor(COLORREF crLineColor);
55 COLORREF GetLineColor() const;
56 D2D1_COLOR_F GetLineColorD2D1() const;
57
58 virtual void SetFillColor(COLORREF crFillColor);
59 virtual void ClearFillColor();
60 COLORREF GetFillColor() const;
61 D2D1_COLOR_F GetFillColorD2D1() const;
62
63 virtual void SetLineColorAlphaBlendingRatio(float f32AlphaBlendingRatio);
64 float GetLineColorAlphaBlendingRatio() const;
65
66 virtual void SetFillColorAlphaBlendingRatio(float f32AlphaBlendingRatio);
67 float GetFillColorAlphaBlendingRatio() const;
68
69 void UseScreenCoord(bool bUse);
70 bool IsUsingScreenCoord() const;
71
72 void Show(bool bShow);
73 bool IsVisible() const;
74
75 void SetDirty(bool bDirty);
76 bool IsDirty() const;
77
78 // 이 값이 true 일 경우, `m_pFigure`는 깊은 복사로 생성된 객체의 포인터가 아닌 단순 참조만 하는 포인터입니다. 따라서 이 값이 true 이면 `m_pFigure`의 메모리 해제를 하지 않습니다.
79 bool IsRefFigure() const;
80
81 // Attribute 의 modified field 를 이용해 그리기 속성을 설정하는 함수
82 virtual const CResult Set(const Foundation::CFLFigureAttributeBasic* pAttr);
83 virtual const CResult Set(const Foundation::CFLFigureTextAttribute* pAttr);
84
85 protected:
86 void SetLayerObjectType(ELayerObjectType eType);
87 public:
88 ELayerObjectType GetLayerObjectType() const;
89
90 public:
91 Foundation::CFLFigure* m_pFigure;
92 Foundation::CFLRect<double> m_rect;
93
94 bool m_bUseScreenCoord;
95 bool m_bShow;
96 bool m_bDirty;
97 ELayerObjectType m_eLayerObjectType;
98
99 protected:
100 COLORREF m_crLineColor;
101 D2D1_COLOR_F m_d2dcLineColor;
102 COLORREF m_crFillColor;
103 D2D1_COLOR_F m_d2dcFillColor;
104
105 float m_f32LineColorAlphaBlendingRatio;
106 float m_f32FillColorAlphaBlendingRatio;
107 bool m_bRefFigure;
108
109 protected:
110 void ConvertColorRefToD2DColor(const COLORREF& crColor, D2D1_COLOR_F& d2dcColor) const;
111
112 friend class CGUIViewImageLayer;
113 friend class CGUIViewImageLayerForDrawing;
114 friend class CGUIViewGraphLayer;
115 };
116 }
117}
118
Definition D2DObject.h:12
@ Assign
CGUIPropertyItemView3DFigure 의 값을 해당 도형으로 설정하는 함수
Definition DefinitionsGUIView3D.h:2930
@ Show
도형 보이기 메뉴
Definition DefinitionsGUIView3D.h:2962
@ Clear
도형 정리 메뉴
Definition DefinitionsGUI.h:2110