FLImaging 6.5.8.1
GUIViewImageLayerObjectText.h
1#pragma once
2
3#include "GUIViewImageLayerObjectBase.h"
4
5namespace FLImaging
6{
7 namespace GUI
8 {
9 class CD2DObject;
10
11 class FL_EXPORT CGUIViewImageLayerObjectText : public CGUIViewImageLayerObjectBase
12 {
13 public:
14 CGUIViewImageLayerObjectText();
15 CGUIViewImageLayerObjectText(const CGUIViewImageLayerObjectText* pRhs);
16 CGUIViewImageLayerObjectText(const CGUIViewImageLayerObjectText& rhs);
17 virtual ~CGUIViewImageLayerObjectText();
18
19 virtual const CResult Assign(const CGUIViewImageLayerObjectText* pRhs);
20 virtual const CResult Assign(const CGUIViewImageLayerObjectText& rhs);
21
22 virtual CGUIViewImageLayerObjectText* DuplicateObject() const;
23 virtual CGUIViewImageLayerObjectText* CreateObject() const;
24
25 virtual void Clear() override;
26 virtual void ClearText();
27 virtual void ClearFontName();
28 virtual void ClearFont();
29
30 virtual void SetText(const Base::CFLString<wchar_t>& strText);
31 Base::CFLString<wchar_t>* GetText() const;
32
33 virtual void SetFontSize(float f32FontSize);
34 float GetFontSize() const;
35
36 virtual void SetFontWeight(EGUIViewImageFontWeight eWeight);
37 EGUIViewImageFontWeight GetFontWeight() const;
38
39 virtual void SetItalic(BOOL bItalic);
40 BOOL IsItalic() const;
41
42 virtual void SetFontName(const Base::CFLString<wchar_t>& strFontName);
43 const wchar_t* GetFontName() const;
44
45 virtual bool CreateFont(Base::CFLBase* pView, CD2DObject* pD2DObject);
46 virtual void SetFont(CFont* pFont);
47 CFont* GetFont() const;
48
49 virtual bool ModifyFont(Base::CFLBase* pView, CD2DObject* pD2DObject);
50
51 IDWriteTextFormat* GetDWriteTextFormat() const;
52 IDWriteTextLayout* GetDWriteTextLayout() const;
53
54 Base::TPoint<float> GetTextExtent();
55 virtual Base::TPoint<float> GetTextExtentOrg(CD2DObject* pD2DObjects);
56
57 bool GetTextRect(double f64Scale, Foundation::CFLRect<float>& flrTextExtent, Foundation::CFLPoint<float>& flpAlign);
58
59 virtual void InitializeDefaultFont();
60 bool NeedToCreateFont();
61
62 virtual void SetRealSizeFont(bool bSet);
63 bool IsRealSizeFont() const;
64
65 virtual void SetFontAngle(double f64Angle);
66 double GetFontAngle() const;
67
68 virtual void SetTextAlign(EGUIViewImageTextAlignment eAlign);
69 EGUIViewImageTextAlignment GetTextAlign() const;
70
71 public:
72 Base::CFLString<wchar_t>* m_pStrText;
73
74 Base::CFLString<wchar_t> m_strFontName;
75 float m_f32FontSize;
76 EGUIViewImageFontWeight m_eFontWeight;
77 bool m_bRealSizeFont;
78 BOOL m_bItalic;
79 double m_f64FontAngle;
80 EGUIViewImageTextAlignment m_eTextAlign;
81
82 CFont* m_pFont;
83 bool m_bCalcTextExtentDone;
84 bool m_bCalcTextExtentOrg;
85 Base::TPoint<float> m_textExtent;
86 Base::TPoint<float> m_textExtentOrg;
87 bool m_bNeedToCreateFont;
88 bool m_bSetFont;
89
90 IDWriteTextFormat* m_pDWriteTextFormat;
91 IDWriteTextLayout* m_pDWriteTextLayout;
92
93 double m_f64PrevScale;
94 Foundation::CFLRect<double> m_rectOrigFigureOfImage; // this 가 이미지에 저장된 Figure 의 Label 일 경우, 해당 Figure 의 boundary rect
95
96 friend class CGUIViewImageLayer;
97 friend class CGUIViewGraphLayer;
98 };
99 }
100}
101
EGUIViewImageTextAlignment
Alignment text in an image view.
Definition GUIDefinitions.h:5096
EGUIViewImageFontWeight
Font thickness of image view.
Definition GUIDefinitions.h:4916
@ Assign
Set the value of CGUIPropertyItemView3DFigure to the specified figure.
@ Clear
Clear all the figure objects.