add: Canvas::Clear method to clear canvas

This commit is contained in:
Haibo 2018-11-19 12:57:44 +08:00 committed by Nomango
parent 09c15c9099
commit 523262866a
2 changed files with 9 additions and 0 deletions

View File

@ -445,6 +445,12 @@ namespace easy2d
cache_expired_ = true;
}
void Canvas::Clear()
{
render_target_->Clear();
cache_expired_ = true;
}
spImage Canvas::ExportToImage() const
{
auto image = new Image(GetBitmap());

View File

@ -153,6 +153,9 @@ namespace easy2d
// ¡žśĚîłä
void FillPath();
// 헌왕뺌꼈
void Clear();
// ÉčÖĂĚîłäŃŐÉŤ
void SetFillColor(
const Color& color