CanvasRenderer: Add Drawable::SetClipPath() Api
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / canvas-renderer-drawable.h
index 0857105..6251375 100644 (file)
@@ -45,7 +45,7 @@ class Shape;
 /**
  * @brief Drawable is a object class for drawing a vector primitive.
  */
-class CanvasRenderer::Drawable : public BaseHandle
+class DALI_ADAPTOR_API CanvasRenderer::Drawable : public BaseHandle
 {
 public:
   /**
@@ -108,6 +108,20 @@ public:
   bool Transform(const Dali::Matrix3& matrix);
 
   /**
+   * @brief Gets the bounding box of the drawable object before any transformation.
+   * @note The bounding box doesn't indicate the rendering region in the result but primitive region of the object.
+   * @return Returns the bounding box information.
+   */
+  Rect<float> GetBoundingBox() const;
+
+  /**
+   * @brief The intersection with clip drawable is determined and only the resulting pixels from own drawable are rendered.
+   * @param[in] clip The clip drawable object.
+   * @return Returns True when it's successful. False otherwise.
+   */
+  bool SetClipPath(Drawable& clip);
+
+  /**
    * @brief Downcast a handle to Drawable handle.
    *
    * If handle points to an InputMethodContext the downcast produces valid