feat(canvas): add DrawActor
This commit is contained in:
parent
185a256223
commit
41f726b489
|
|
@ -86,6 +86,11 @@ public:
|
||||||
/// @brief ½áÊøäÖȾ
|
/// @brief ½áÊøäÖȾ
|
||||||
void EndDraw();
|
void EndDraw();
|
||||||
|
|
||||||
|
/// \~chinese
|
||||||
|
/// @brief »½ÇÉ«
|
||||||
|
/// @param actor ½ÇÉ«
|
||||||
|
void DrawActor(ActorPtr actor);
|
||||||
|
|
||||||
/// \~chinese
|
/// \~chinese
|
||||||
/// @brief »ÐÎ×´ÂÖÀª
|
/// @brief »ÐÎ×´ÂÖÀª
|
||||||
/// @param shape ÐÎ×´
|
/// @param shape ÐÎ×´
|
||||||
|
|
@ -302,6 +307,15 @@ inline void CanvasRenderContext::EndDraw()
|
||||||
ctx_->EndDraw();
|
ctx_->EndDraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void CanvasRenderContext::DrawActor(ActorPtr actor)
|
||||||
|
{
|
||||||
|
KGE_ASSERT(ctx_);
|
||||||
|
if (actor)
|
||||||
|
{
|
||||||
|
actor->OnRender(*ctx_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
inline void CanvasRenderContext::DrawShape(ShapePtr shape)
|
inline void CanvasRenderContext::DrawShape(ShapePtr shape)
|
||||||
{
|
{
|
||||||
KGE_ASSERT(ctx_);
|
KGE_ASSERT(ctx_);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue