2019-04-11 14:40:54 +08:00
|
|
|
|
// Copyright (c) 2016-2018 Kiwano - Nomango
|
2020-01-21 10:09:55 +08:00
|
|
|
|
//
|
2019-03-31 01:37:06 +08:00
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
|
// in the Software without restriction, including without limitation the rights
|
|
|
|
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
|
// furnished to do so, subject to the following conditions:
|
2020-01-21 10:09:55 +08:00
|
|
|
|
//
|
2019-03-31 01:37:06 +08:00
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
|
|
// all copies or substantial portions of the Software.
|
2020-01-21 10:09:55 +08:00
|
|
|
|
//
|
2019-03-31 01:37:06 +08:00
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
|
// THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2019-10-11 21:55:29 +08:00
|
|
|
|
#include <kiwano/2d/Actor.h>
|
2020-01-17 16:55:47 +08:00
|
|
|
|
#include <kiwano/render/Brush.h>
|
2020-02-05 19:56:22 +08:00
|
|
|
|
#include <kiwano/render/Shape.h>
|
|
|
|
|
|
#include <kiwano/render/ShapeSink.h>
|
2020-01-17 16:55:47 +08:00
|
|
|
|
#include <kiwano/render/StrokeStyle.h>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-04-11 14:40:54 +08:00
|
|
|
|
namespace kiwano
|
2019-03-31 01:37:06 +08:00
|
|
|
|
{
|
2020-01-21 10:09:55 +08:00
|
|
|
|
KGE_DECLARE_SMART_PTR(ShapeActor);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(LineActor);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(RectActor);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(RoundRectActor);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(CircleActor);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(EllipseActor);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(PolygonActor);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* \addtogroup Actors
|
|
|
|
|
|
* @{
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* \~chinese
|
|
|
|
|
|
* @brief <EFBFBD><EFBFBD>ά<EFBFBD><EFBFBD>״<EFBFBD><EFBFBD>ɫ
|
|
|
|
|
|
*/
|
|
|
|
|
|
class KGE_API ShapeActor : public Actor
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ά<EFBFBD><CEAC>״<EFBFBD><D7B4>ɫ
|
|
|
|
|
|
ShapeActor();
|
|
|
|
|
|
|
|
|
|
|
|
virtual ~ShapeActor();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD>仭ˢ
|
|
|
|
|
|
BrushPtr GetFillBrush() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ
|
|
|
|
|
|
BrushPtr GetStrokeBrush() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
float GetStrokeWidth() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
|
const StrokeStyle& GetStrokeStyle() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1>״
|
2020-02-05 19:56:22 +08:00
|
|
|
|
ShapePtr GetShape() const;
|
2020-01-21 10:09:55 +08:00
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>߽<EFBFBD>
|
|
|
|
|
|
Rect GetBounds() const override;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD>а<EFBFBD>Χ<EFBFBD><CEA7>
|
|
|
|
|
|
Rect GetBoundingBox() const override;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20>жϵ<D0B6><CFB5>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>״<EFBFBD><D7B4>
|
|
|
|
|
|
bool ContainsPoint(const Point& point) const override;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|
|
|
|
|
/// @param color <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|
|
|
|
|
void SetFillColor(Color const& color);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>仭ˢ
|
|
|
|
|
|
/// @param[in] brush <20><><EFBFBD>仭ˢ
|
|
|
|
|
|
void SetFillBrush(BrushPtr brush);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|
|
|
|
|
/// @param color <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|
|
|
|
|
void SetStrokeColor(Color const& color);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ
|
|
|
|
|
|
/// @param[in] brush <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ
|
|
|
|
|
|
void SetStrokeBrush(BrushPtr brush);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD>Ĭ<EFBFBD><C4AC>Ϊ 1.0
|
|
|
|
|
|
void SetStrokeWidth(float width);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
|
void SetStrokeStyle(const StrokeStyle& stroke_style);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD>״
|
2020-02-05 19:56:22 +08:00
|
|
|
|
void SetShape(ShapePtr shape);
|
2020-01-21 10:09:55 +08:00
|
|
|
|
|
|
|
|
|
|
void OnRender(RenderContext& ctx) override;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
bool CheckVisibility(RenderContext& ctx) const override;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
BrushPtr fill_brush_;
|
|
|
|
|
|
BrushPtr stroke_brush_;
|
|
|
|
|
|
float stroke_width_;
|
|
|
|
|
|
StrokeStyle stroke_style_;
|
|
|
|
|
|
Rect bounds_;
|
2020-02-05 19:56:22 +08:00
|
|
|
|
ShapePtr shape_;
|
2020-01-21 10:09:55 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20>߶<EFBFBD>ͼ<EFBFBD>ν<EFBFBD>ɫ
|
|
|
|
|
|
class KGE_API LineActor : public ShapeActor
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
LineActor();
|
|
|
|
|
|
|
|
|
|
|
|
virtual ~LineActor();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>߶<EFBFBD><DFB6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
Point const& GetBeginPoint() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>߶<EFBFBD><DFB6>յ<EFBFBD>
|
|
|
|
|
|
Point const& GetEndPoint() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD><DFB6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param begin <20>߶<EFBFBD><DFB6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void SetBeginPoint(Point const& begin);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD><DFB6>յ<EFBFBD>
|
|
|
|
|
|
/// @param end <20>߶<EFBFBD><DFB6>յ<EFBFBD>
|
|
|
|
|
|
void SetEndPoint(Point const& end);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>þ<EFBFBD><C3BE>δ<EFBFBD>С
|
|
|
|
|
|
/// @param begin <20>߶<EFBFBD><DFB6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param end <20>߶<EFBFBD><DFB6>յ<EFBFBD>
|
|
|
|
|
|
void SetLine(Point const& begin, Point const& end);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
Point begin_;
|
|
|
|
|
|
Point end_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ν<EFBFBD>ɫ
|
|
|
|
|
|
class KGE_API RectActor : public ShapeActor
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
RectActor();
|
|
|
|
|
|
|
|
|
|
|
|
virtual ~RectActor();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD>δ<EFBFBD>С
|
|
|
|
|
|
Size const& GetRectSize() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>þ<EFBFBD><C3BE>δ<EFBFBD>С
|
|
|
|
|
|
/// @param size <20><><EFBFBD>δ<EFBFBD>С
|
|
|
|
|
|
void SetRectSize(Size const& size);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
Size rect_size_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief Բ<>Ǿ<EFBFBD><C7BE>ν<EFBFBD>ɫ
|
|
|
|
|
|
class KGE_API RoundRectActor : public ShapeActor
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
RoundRectActor();
|
|
|
|
|
|
|
|
|
|
|
|
virtual ~RoundRectActor();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡԲ<C8A1>ǰ뾶
|
|
|
|
|
|
Vec2 GetRadius() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡԲ<C8A1>Ǿ<EFBFBD><C7BE>δ<EFBFBD>С
|
|
|
|
|
|
Size GetRectSize() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>Բ<EFBFBD>ǰ뾶
|
|
|
|
|
|
/// @param radius Բ<>ǰ뾶
|
|
|
|
|
|
void SetRadius(Vec2 const& radius);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>Բ<EFBFBD>Ǿ<EFBFBD><C7BE>δ<EFBFBD>С
|
|
|
|
|
|
/// @param size Բ<>Ǿ<EFBFBD><C7BE>δ<EFBFBD>С
|
|
|
|
|
|
void SetRectSize(Size const& size);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>Բ<EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD>
|
|
|
|
|
|
/// @param size Բ<>Ǿ<EFBFBD><C7BE>δ<EFBFBD>С
|
|
|
|
|
|
/// @param radius Բ<>ǰ뾶
|
|
|
|
|
|
void SetRoundedRect(Size const& size, Vec2 const& radius);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
Size rect_size_;
|
|
|
|
|
|
Vec2 radius_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief Բ<>ν<EFBFBD>ɫ
|
|
|
|
|
|
class KGE_API CircleActor : public ShapeActor
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CircleActor();
|
|
|
|
|
|
|
|
|
|
|
|
virtual ~CircleActor();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡԲ<C8A1>ΰ뾶
|
|
|
|
|
|
float GetRadius() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>Բ<EFBFBD>ΰ뾶
|
|
|
|
|
|
/// @param radius Բ<>ΰ뾶
|
|
|
|
|
|
void SetRadius(float radius);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
float radius_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>Բ<EFBFBD><D4B2>ɫ
|
|
|
|
|
|
class KGE_API EllipseActor : public ShapeActor
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
EllipseActor();
|
|
|
|
|
|
|
|
|
|
|
|
virtual ~EllipseActor();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1>Բ<EFBFBD>뾶
|
|
|
|
|
|
Vec2 GetRadius() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD>뾶
|
|
|
|
|
|
/// @param radius <20><>Բ<EFBFBD>뾶
|
|
|
|
|
|
void SetRadius(Vec2 const& radius);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
Vec2 radius_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD>ɫ
|
|
|
|
|
|
class KGE_API PolygonActor : public ShapeActor
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
PolygonActor();
|
|
|
|
|
|
|
|
|
|
|
|
virtual ~PolygonActor();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ζ˵<CEB6>
|
|
|
|
|
|
/// @param points <20><><EFBFBD><EFBFBD><EFBFBD>ζ˵㼯<CBB5><E3BCAF>
|
|
|
|
|
|
void SetVertices(Vector<Point> const& points);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
|
|
|
|
inline void ShapeActor::SetStrokeColor(Color const& color)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!stroke_brush_)
|
|
|
|
|
|
{
|
|
|
|
|
|
stroke_brush_ = new Brush;
|
|
|
|
|
|
}
|
|
|
|
|
|
stroke_brush_->SetColor(color);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void ShapeActor::SetFillColor(Color const& color)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!fill_brush_)
|
|
|
|
|
|
{
|
|
|
|
|
|
fill_brush_ = new Brush;
|
|
|
|
|
|
}
|
|
|
|
|
|
fill_brush_->SetColor(color);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void ShapeActor::SetFillBrush(BrushPtr brush)
|
|
|
|
|
|
{
|
|
|
|
|
|
fill_brush_ = brush;
|
|
|
|
|
|
}
|
|
|
|
|
|
inline void ShapeActor::SetStrokeBrush(BrushPtr brush)
|
|
|
|
|
|
{
|
|
|
|
|
|
stroke_brush_ = brush;
|
|
|
|
|
|
}
|
|
|
|
|
|
inline BrushPtr ShapeActor::GetFillBrush() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return fill_brush_;
|
|
|
|
|
|
}
|
|
|
|
|
|
inline BrushPtr ShapeActor::GetStrokeBrush() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return stroke_brush_;
|
|
|
|
|
|
}
|
|
|
|
|
|
inline float ShapeActor::GetStrokeWidth() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return stroke_width_;
|
|
|
|
|
|
}
|
|
|
|
|
|
inline const StrokeStyle& ShapeActor::GetStrokeStyle() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return stroke_style_;
|
|
|
|
|
|
}
|
2020-02-05 19:56:22 +08:00
|
|
|
|
inline ShapePtr ShapeActor::GetShape() const
|
2020-01-21 10:09:55 +08:00
|
|
|
|
{
|
2020-02-05 19:56:22 +08:00
|
|
|
|
return shape_;
|
2020-01-21 10:09:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Point const& LineActor::GetBeginPoint() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return begin_;
|
|
|
|
|
|
}
|
|
|
|
|
|
inline Point const& LineActor::GetEndPoint() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return end_;
|
|
|
|
|
|
}
|
|
|
|
|
|
inline void LineActor::SetBeginPoint(Point const& begin)
|
|
|
|
|
|
{
|
|
|
|
|
|
SetLine(begin, end_);
|
|
|
|
|
|
}
|
|
|
|
|
|
inline void LineActor::SetEndPoint(Point const& end)
|
|
|
|
|
|
{
|
|
|
|
|
|
SetLine(begin_, end);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Size const& RectActor::GetRectSize() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return rect_size_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Vec2 RoundRectActor::GetRadius() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return radius_;
|
|
|
|
|
|
}
|
|
|
|
|
|
inline Size RoundRectActor::GetRectSize() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return GetSize();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline float CircleActor::GetRadius() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return radius_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Vec2 EllipseActor::GetRadius() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return radius_;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
}
|
2020-01-21 10:09:55 +08:00
|
|
|
|
} // namespace kiwano
|