Add an API that removes the all drawables registered with AddDrawable().
Change-Id: I6a47c4ce980cdebb374acfe8dfb87b0a815de138
return false;
}
+ bool RemoveAllDrawables()
+ {
+ if (mDrawable)
+ {
+ return true;
+ }
+ return false;
+ }
+
Devel::PixelBuffer GetPixelBuffer()
{
return mPixelBuffer;
return Internal::Adaptor::GetImplementation(*this).RemoveDrawable(drawable);
}
+bool CanvasRenderer::RemoveAllDrawables()
+{
+ return Internal::Adaptor::GetImplementation(*this).RemoveAllDrawables();
+}
+
bool CanvasRenderer::SetSize(const Vector2& size)
{
return Internal::Adaptor::GetImplementation(*this).SetSize(size);
END_TEST;
}
+int UtcDaliCanvasViewRemoveAllP(void)
+{
+ ToolkitTestApplication application;
+ CanvasView canvasView = CanvasView::New(Vector2(100,100));
+ DALI_TEST_CHECK( canvasView );
+
+ Dali::CanvasRenderer::Shape shape = Dali::CanvasRenderer::Shape::New();
+
+ canvasView.AddDrawable(shape);
+
+ canvasView.RemoveAllDrawables();
+
+ END_TEST;
+}
+
+int UtcDaliCanvasViewRemoveAllN(void)
+{
+ ToolkitTestApplication application;
+
+ CanvasView canvasView = CanvasView::New(Vector2(100,100));
+ DALI_TEST_CHECK( canvasView );
+
+ canvasView.RemoveAllDrawables();
+
+ END_TEST;
+}
+
+
int UtcDaliCanvasViewChangeSizeP(void)
{
ToolkitTestApplication application;
return Dali::Toolkit::GetImpl(*this).RemoveDrawable(drawable);
}
+void CanvasView::RemoveAllDrawables()
+{
+ Dali::Toolkit::GetImpl(*this).RemoveAllDrawables();
+}
+
CanvasView::CanvasView(Internal::CanvasView& implementation)
: Control(implementation)
{
*/
bool RemoveDrawable(Dali::CanvasRenderer::Drawable& drawable);
+ /**
+ * @brief Remove all drawable objects added to the CanvasView.
+ */
+ void RemoveAllDrawables();
+
public: // Not intended for application developers
/// @cond internal
/**
return false;
}
+bool CanvasView::RemoveAllDrawables()
+{
+ if(mCanvasRenderer && mCanvasRenderer.RemoveAllDrawables())
+ {
+ return true;
+ }
+ return false;
+}
+
bool CanvasView::SetViewBox(const Vector2& viewBox)
{
if(mCanvasRenderer && mCanvasRenderer.SetViewBox(viewBox))
*/
bool RemoveDrawable(Dali::CanvasRenderer::Drawable& drawable);
+ /**
+ * @copydoc Toolkit::Control::CanvasView::RemoveAllDrawables
+ */
+ bool RemoveAllDrawables();
+
private: // From Control
/**
* @copydoc Control::OnRelayout