xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
rectangle.hpp
浏览该文件的文档.
1#pragma once
2#include <xcal/public.h>
3
7
8namespace xcal::mobject {
9
11 : public ComposedMObject<Rectangle, BaseTransformableMobject,
12 StrokeableMObject> {
14 private:
16 property::Scalar width_;
17 property::Scalar height_;
18
19 public:
21 float_t height)
22 : width_(width), height_(height) {
23 set_pos(pos);
24 register_properties(pos_, width_, height_);
25 }
26 const property::Scalar& width() const { return width_; }
27 property::Scalar& width() { return width_; }
28 const property::Scalar& height() const { return height_; }
29 property::Scalar& height() { return height_; }
30 ~Rectangle() override = default;
31};
32
33} // namespace xcal::mobject
property::Scalar & width()
Definition rectangle.hpp:27
const property::Scalar & height() const
Definition rectangle.hpp:28
const property::Scalar & width() const
Definition rectangle.hpp:26
property::Scalar & height()
Definition rectangle.hpp:29
~Rectangle() override=default
Rectangle(const property::Vec< float, 3 >::data_t &pos, float_t width, float_t height)
Definition rectangle.hpp:20
Vector class template
Definition vec.hpp:206
基础图形对象类
#define XCAL_MOBJECT_TYPE(type)
float float_t
Definition public.h:27
#define XCAL_API
Definition public.h:69