Cumulia Illustrator Rendering Engine v2.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
textdecal.h
1//##################################################################################################
2//
3// Copyright (c) 2024 Beijing Qiongqi Tech Co.,Ltd. All rights reserved.
4
5// This source code is confidential and proprietary to Beijing Qiongqi Tech Co.,Ltd(The Holder).
6// Any unauthorized use, copying, modification, or distribution of the code is strictly prohibited.
7// Any user shall obtain authorizaition from the Holder before modifying the source code. And the user shall not
8// sublicense, sell, distribute, or transfer the source code, whether in original or modified form, to any third party
9// without the prior written consent of the Holder.
10
11// This copyright notice and permission grant shall be included in all copies or substantial portions of the source code.
12
13// Author Cumulia Illustrator
14// Date 2025-08-05
15// Version V2.1.0
16//##################################################################################################
17
18#pragma once
19
20#include "decal.h"
21
22#include <cilcore.h>
23
24#include <string>
25
26namespace cil
27{
28 class TextDecal : public Decal
29 {
30 public:
31 TextDecal(const std::wstring& text, const Vector3f& position);
32 TextDecal(const std::string& text, const Vector3f& position);
33 virtual ~TextDecal();
34
35 int fontSize() const;
36 void setFontSize(int size);
38 void setFontColor(const Color3f& color);
39 std::string fontFamily() const;
40 void setFontFamily(const std::string& family);
41 std::wstring text() const;
42 void setText(const std::wstring& text);
43 void setText(const std::string& text);
44 int padding() const;
47 void setBackgroundColor(const Color3f& color);
49 void setBorderColor(const Color3f& color);
50 void generate();
51
52 private:
53 int m_fontSize;
54 std::shared_ptr<Color3f> m_fontColor;
55 std::string m_fontFamily;
56 std::wstring m_text;
57 int m_padding;
58 std::shared_ptr<Color3f> m_backgroundColor;
59 std::shared_ptr<Color3f> m_borderColor;
60 };
61
62 std::shared_ptr<TextDecal> _textDecal(const std::wstring& text, const Vector3f& position);
63 std::shared_ptr<TextDecal> _textDecal(const std::string& text, const Vector3f& position);
64}
The Color3f class inherits from Color3, specilizing the template parameters to float for element type...
Definition color.h:105
Definition decal.h:25
Vector3f position() const
Definition textdecal.h:29
void setText(const std::wstring &text)
void setFontFamily(const std::string &family)
std::string fontFamily() const
Color3f borderColor() const
void setPadding(int padding)
int fontSize() const
Color3f backgroundColor() const
Color3f fontColor() const
virtual ~TextDecal()
std::wstring text() const
void setFontColor(const Color3f &color)
TextDecal(const std::string &text, const Vector3f &position)
void setFontSize(int size)
void setBorderColor(const Color3f &color)
void setBackgroundColor(const Color3f &color)
void setText(const std::string &text)
TextDecal(const std::wstring &text, const Vector3f &position)
int padding() const
The class Vector3f inherits from the templated class of Vector3, and the template parameters are spec...
Definition vector.h:322
Definition decal.h:23
std::shared_ptr< TextDecal > _textDecal(const std::wstring &text, const Vector3f &position)