Cumulia Illustrator Rendering Engine v1.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
scale.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 2024-10-31
15// Version V1.1.0
16//##################################################################################################
17
18#pragma once
19
20#include <cilcore.h>
21
22#include <string>
23
24namespace cil
25{
26 class Scale : public Pass
27 {
28 public:
29 std::function<std::string(float)> toString;
30
31 public:
32 Scale(const std::shared_ptr<Camera>& camera, const std::shared_ptr<Background>& background);
33 virtual ~Scale();
34
35 int fontSize() const;
36 void setFontSize(int size);
37 std::string fontFamily() const;
38 void setFontFamily(const std::string& family);
40 void setLineColor(const Color3f& color);
42 void setTextColor(const Color3f& color);
43 void generate();
44
45 private:
46 std::shared_ptr<Camera> m_camera;
47 std::shared_ptr<Background> m_background;
48 float m_devicePixelRatio;
49 int m_fontSize;
50 std::string m_fontFamily;
51 std::shared_ptr<Color3f> m_lineColor;
52 std::shared_ptr<Color3f> m_textColor;
53 float m_currentWidth;
54 };
55
56 std::shared_ptr<Scale> _scale(const std::shared_ptr<Camera>& camera, const std::shared_ptr<Background>& background);
57}
The Color3f class inherits from Color3, specilizing the template parameters to float for element type...
Definition color.h:105
The Pass class represents a rendering pass within a graphics pipeline.
Definition pass.h:34
std::shared_ptr< Background > background
This member holds a shared pointer to a Background object which defines the scene background.
Definition pass.h:38
std::shared_ptr< Camera > camera
This member holds a shared pointer to a Camera object which the current pass uses for rendering.
Definition pass.h:39
Definition scale.h:27
virtual ~Scale()
void setFontSize(int size)
void setLineColor(const Color3f &color)
void setFontFamily(const std::string &family)
void setTextColor(const Color3f &color)
int fontSize() const
std::string fontFamily() const
Color3f lineColor() const
std::function< std::string(float)> toString
Definition scale.h:29
Color3f textColor() const
void generate()
Scale(const std::shared_ptr< Camera > &camera, const std::shared_ptr< Background > &background)
Definition decal.h:23
std::shared_ptr< Scale > _scale(const std::shared_ptr< Camera > &camera, const std::shared_ptr< Background > &background)