X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fcanvas-renderer%2Fcommon%2Fdrawable-impl.h;h=811a0d3ecea938f22512adf2d924a9952fee6d32;hb=da0e60c71a76caf31e235f48eea008766020dbcf;hp=8222833f4d7f82a32ffa969f367edd6d1fc84cac;hpb=949195d82375ddb310c2971a3360f224795e1391;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/canvas-renderer/common/drawable-impl.h b/dali/internal/canvas-renderer/common/drawable-impl.h index 8222833..811a0d3 100644 --- a/dali/internal/canvas-renderer/common/drawable-impl.h +++ b/dali/internal/canvas-renderer/common/drawable-impl.h @@ -19,9 +19,6 @@ */ // EXTERNAL INCLUDES -#ifdef THORVG_SUPPORT -#include -#endif #include // INTERNAL INCLUDES @@ -45,9 +42,21 @@ public: */ enum class Types { - NONE = 0, ///< Means that type is not defined. - SHAPE, ///< Meaning of Shape class that inherits Drawable. - DRAWABLE_GROUP ///< Meaning of DrawableGorup class that inherits Drawable. + NONE = 0, ///< Means that type is not defined. + SHAPE, ///< Meaning of Shape class that inherits Drawable. + DRAWABLE_GROUP, ///< Meaning of DrawableGorup class that inherits Drawable. + PICTURE ///< Meaning of Picture class that inherits Drawable. + }; + + /** + * @brief Enumeration indicating type used in the composition of two objects - the target and the source. + */ + enum class CompositionType + { + NONE = 0, ///< Means that type is not defined. + CLIP_PATH, ///< The intersection of the source and the target is determined and only the resulting pixels from the source are rendered. + ALPHA_MASK, ///< The pixels of the source and the target are alpha blended. As a result, only the part of the source, which intersects with the target is visible. + ALPHA_MASK_INVERSE ///< The pixels of the source and the complement to the target's pixels are alpha blended. As a result, only the part of the source which is not covered by the target is visible. }; public: @@ -67,32 +76,32 @@ public: void Create(); /** - * @copydoc Dali::CanvasRenderer::Drawable::SetOpacity + * @copydoc Dali::CanvasRenderer::Drawable::SetOpacity() */ virtual bool SetOpacity(float opacity); /** - * @copydoc Dali::CanvasRenderer::Drawable::GetOpacity + * @copydoc Dali::CanvasRenderer::Drawable::GetOpacity() */ virtual float GetOpacity() const; /** - * @copydoc Dali::CanvasRenderer::Drawable::Rotate + * @copydoc Dali::CanvasRenderer::Drawable::Rotate() */ virtual bool Rotate(Degree degree); /** - * @copydoc Dali::CanvasRenderer::Drawable::Scale + * @copydoc Dali::CanvasRenderer::Drawable::Scale() */ virtual bool Scale(float factor); /** - * @copydoc Dali::CanvasRenderer::Drawable::Translate + * @copydoc Dali::CanvasRenderer::Drawable::Translate() */ virtual bool Translate(Vector2 translate); /** - * @copydoc Dali::CanvasRenderer::Drawable::Transform + * @copydoc Dali::CanvasRenderer::Drawable::Transform() */ virtual bool Transform(const Dali::Matrix3& matrix); @@ -102,6 +111,28 @@ public: virtual Rect GetBoundingBox() const; /** + * @copydoc Dali::CanvasRenderer::Drawable::SetClipPath() + */ + virtual bool SetClipPath(Dali::CanvasRenderer::Drawable& clip); + + /** + * @copydoc Dali::CanvasRenderer::Drawable::SetMask() + */ + virtual bool SetMask(Dali::CanvasRenderer::Drawable& mask, Dali::CanvasRenderer::Drawable::MaskType type); + + /** + * @brief Returns a composition drawble object. + * @return Returns a composition drawble object. + */ + virtual Dali::CanvasRenderer::Drawable GetCompositionDrawable() const; + + /** + * @brief Returns a composition type + * @return Returns a composition type + */ + virtual CompositionType GetCompositionType() const; + + /** * @brief Set whether this drawable object was added to other object(CanvasRenderer or DrawableGroup) or not. * @param[in] added Ture if added, false otherwise. */