Revert "[Tizen] Add to get the status whether window is rotating or not"
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / canvas-renderer.h
index 9216ced..2b6bf5e 100644 (file)
@@ -20,9 +20,9 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/base-handle.h>
+#include <dali/public-api/rendering/texture.h>
 
 // INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/public-api/dali-adaptor-common.h>
 
 namespace Dali
@@ -84,10 +84,17 @@ public:
 public:
   class Drawable;
   class Shape;
+  class DrawableGroup;
+  class Picture;
+
+  class Gradient;
+  class LinearGradient;
+  class RadialGradient;
 
 public:
   /**
-   * @brief Draw inner canvas the contexts added to the CanvasRenderer.
+   * @brief Prepare for drawing drawables added to CanvasRenderer on inner canvas.
+   * @return Returns True when it's successful. False otherwise.
    */
   bool Commit();
 
@@ -100,24 +107,63 @@ public:
   bool AddDrawable(Drawable& drawable);
 
   /**
-   * @brief Returns the PixelBuffer, which is the Render buffer of Canvas.
+   * @brief Remove drawable object to the CanvasView.
+   * This method is similar to deregistration. Freeing memory is not concerned for drawables being removed.
+   * @param[in] drawable the drawable object.
+   * @return Returns True when it's successful. False otherwise.
+   */
+  bool RemoveDrawable(Drawable& drawable);
+
+  /**
+   * @brief Remove all drawable objects added to the CanvasRenderer.
+   * @return Returns True when it's successful. False otherwise.
+   */
+  bool RemoveAllDrawables();
+
+  /**
+   * @brief Returns the rasterized texture.
    *
-   * @return Returns the pixel buffer.
+   * @return Returns the texture.
+   */
+  Dali::Texture GetRasterizedTexture();
+
+  /**
+   * @brief Draw drawables added to CanvasRenderer to inner buffer.
+   * @return Returns True when it's successful. False otherwise.
+   */
+  bool Rasterize();
+
+  /**
+   * @brief Returns whether the drawables added to the Canvas are changed.
+   * @return Returns True when drawables added to the Canvas are changed, False otherwise.
    */
-  Devel::PixelBuffer GetPixelBuffer();
+  bool IsCanvasChanged() const;
 
   /**
    * @brief This is the size of the buffer in the Canvas.
    * @param[in] size The size of canvas buffer.
    * @return Returns True when it's successful. False otherwise.
    */
-  bool SetSize(const Vector2& size);
+  bool SetSize(Vector2 size);
 
   /**
    * @brief This is the size of the Buffer in the Canvas.
    * @return Returns The size of canvas buffer.
    */
-  const Vector2& GetSize();
+  Vector2 GetSize() const;
+
+  /**
+   * @brief This is the viewbox of the Canvas.
+   * @param[in] viewBox The size of viewbox.
+   * @return Returns True when it's successful. False otherwise.
+   */
+  bool SetViewBox(const Vector2& viewBox);
+
+  /**
+   * @brief This is the viewbox of the Canvas.
+   * @return Returns The size of viewbox.
+   */
+  const Vector2& GetViewBox();
 
 public: // Not intended for application developers
   /// @cond internal