22#include <kiwano/2d/Actor.h>
23#include <kiwano/render/Brush.h>
24#include <kiwano/render/Shape.h>
25#include <kiwano/render/ShapeMaker.h>
26#include <kiwano/render/StrokeStyle.h>
84 Rect GetBounds()
const override;
88 Rect GetBoundingBox()
const override;
92 bool ContainsPoint(
const Point& point)
const override;
97 void SetFillColor(
const Color& color);
107 void SetStrokeColor(
const Color& color);
152 const Point& GetBeginPoint()
const;
156 const Point& GetEndPoint()
const;
161 void SetBeginPoint(
const Point& begin);
166 void SetEndPoint(
const Point& end);
172 void SetLine(
const Point& begin,
const Point& end);
195 const Size& GetRectSize()
const;
200 void SetRectSize(
const Size& size);
223 Vec2 GetRadius()
const;
227 Size GetRectSize()
const;
232 void SetRadius(
const Vec2& radius);
237 void SetRectSize(
const Size& size);
243 void SetRoundedRect(
const Size& size,
const Vec2& radius);
266 float GetRadius()
const;
271 void SetRadius(
float radius);
293 Vec2 GetRadius()
const;
298 void SetRadius(
const Vec2& radius);
321 void SetVertices(
const Vector<Point>& vertices);
330 stroke_brush_ = MakePtr<Brush>();
332 stroke_brush_->SetColor(color);
339 fill_brush_ = MakePtr<Brush>();
341 fill_brush_->SetColor(color);
351 stroke_brush_ = brush;
361 return stroke_brush_;
366 return stroke_style_;
376 stroke_style_ = stroke_style;
virtual Size GetSize() const
获取大小
Definition: Actor.h:608
圆形角色
Definition: ShapeActor.h:253
float GetRadius() const
获取圆形半径
Definition: ShapeActor.h:414
椭圆角色
Definition: ShapeActor.h:280
Vec2 GetRadius() const
获取椭圆半径
Definition: ShapeActor.h:419
线段角色
Definition: ShapeActor.h:138
void SetBeginPoint(const Point &begin)
设置线段起点
Definition: ShapeActor.h:389
void SetEndPoint(const Point &end)
设置线段终点
Definition: ShapeActor.h:394
const Point & GetEndPoint() const
获取线段终点
Definition: ShapeActor.h:384
const Point & GetBeginPoint() const
获取线段起点
Definition: ShapeActor.h:379
void SetLine(const Point &begin, const Point &end)
设置线段起点和终点
Definition: ShapeActor.cpp:124
多边形角色
Definition: ShapeActor.h:307
矩形角色
Definition: ShapeActor.h:182
const Size & GetRectSize() const
获取矩形大小
Definition: ShapeActor.h:399
引用计数智能指针
Definition: RefBasePtr.hpp:35
渲染上下文
Definition: RenderContext.h:62
圆角矩形角色
Definition: ShapeActor.h:209
Size GetRectSize() const
获取圆角矩形大小
Definition: ShapeActor.h:409
Vec2 GetRadius() const
获取圆角半径
Definition: ShapeActor.h:404
形状角色
Definition: ShapeActor.h:41
RefPtr< Shape > GetShape() const
获取形状
Definition: ShapeActor.h:369
RefPtr< StrokeStyle > GetStrokeStyle() const
获取线条样式
Definition: ShapeActor.h:364
RefPtr< Brush > GetStrokeBrush() const
获取轮廓画刷
Definition: ShapeActor.h:359
void SetStrokeColor(const Color &color)
设置轮廓颜色
Definition: ShapeActor.h:326
void SetFillColor(const Color &color)
设置填充颜色
Definition: ShapeActor.h:335
void SetStrokeBrush(RefPtr< Brush > brush)
设置轮廓画刷
Definition: ShapeActor.h:349
RefPtr< Brush > GetFillBrush() const
获取填充画刷
Definition: ShapeActor.h:354
void SetStrokeStyle(RefPtr< StrokeStyle > stroke_style)
设置线条样式
Definition: ShapeActor.h:374
void SetFillBrush(RefPtr< Brush > brush)
设置填充画刷
Definition: ShapeActor.h:344