Anti-Aliasing of BorderRenderer
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / renderers / border / border-renderer.h
index 859cf01..56ff901 100644 (file)
@@ -37,10 +37,11 @@ namespace Internal
  *
  * The following properties are required for create a BorderRender
  *
- * | %Property Name   | Type        |
- * |------------------|-------------|
- * | border-color     | VECTOR4     |
- * | border-size      | FLOAT       |
+ * | %Property Name  | Type        |
+ * |-----------------|-------------|
+ * | borderColor     | VECTOR4     |
+ * | borderSize      | FLOAT       |
+ * | antiAliasing    | BOOLEAN     |
  */
 
 class BorderRenderer : public ControlRenderer
@@ -71,12 +72,7 @@ protected:
   /**
    * @copydoc ControlRenderer::DoInitialize
    */
-  virtual void DoInitialize( const Property::Map& propertyMap );
-
-  /**
-   * @copydoc ControlRenderer::InitializeRenderer
-   */
-  virtual void InitializeRenderer( Renderer& renderer );
+  virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap );
 
   /**
    * @copydoc ControlRenderer::DoSetOnStage
@@ -102,9 +98,26 @@ public:
    */
   void SetBorderSize( float size );
 
+  /**
+   * Enable/Disable the anti-aliasing.
+   * @param[in] enable Whether the anti-aliasing be enabled or not.
+   */
+  void RequireAntiAliasing( bool antiAliasing );
+
 private:
 
   /**
+   * @brief Initialize the renderer with the geometry and shader from the cache, if not available, create and save to the cache for sharing.
+   */
+  void InitializeRenderer();
+
+  /**
+   * Request the border shader from the factory cache. If fail, create tha shader and add it to cache.
+   * @return The border shader.
+   */
+  Shader GetBorderShader();
+
+  /**
    * Create the geometry which presents the border.
    * @return The border geometry
    */
@@ -123,6 +136,8 @@ private:
 
   Property::Index mBorderColorIndex;
   Property::Index mBorderSizeIndex;
+
+  bool mAntiAliasing;
 };
 
 } // namespace Internal