Remove ImageActor from Builder & some doxygen update
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / renderers / image / image-renderer.h
index 2a8af0f..da7e100 100644 (file)
@@ -30,6 +30,8 @@
 namespace Dali
 {
 
+class NativeImage;
+
 namespace Toolkit
 {
 
@@ -46,28 +48,28 @@ typedef IntrusivePtr< ImageRenderer > ImageRendererPtr;
  *
  * | %Property Name          | Type             |
  * |-------------------------|------------------|
- * | imageUrl                | STRING           |
- * | imageFittingMode        | STRING           |
- * | imageSamplingMode       | STRING           |
- * | imageDesiredWidth       | INT              |
- * | imageDesiredHeight      | INT              |
+ * | url                | STRING           |
+ * | fittingMode        | STRING           |
+ * | samplingMode       | STRING           |
+ * | desiredWidth       | INT              |
+ * | desiredHeight      | INT              |
  *
  * where imageFittingMode should be one of the following fitting modes:
- *   "shrinkToFit"
- *   "scaleToFill"
- *   "fitWidth"
- *   "fitHeight"
- *   "default"
+ *   "SHRINK_TO_FIT"
+ *   "SCALE_TO_FIT"
+ *   "FIT_WIDTH"
+ *   "FIT_HEIGHT"
+ *   "DEFAULT"
  *
  * where imageSamplingMode should be one of the following sampling modes:
- *   "box"
- *   "nearest"
- *   "linear"
- *   "boxThenNearest"
- *   "boxThenLinear"
- *   "noFilter"
- *   "dontCare"
- *   "default"
+ *   "BOX"
+ *   "NEAREST"
+ *   "LINEAR"
+ *   "BOX_THEN_NEAREST"
+ *   "BOX_THEN_LINEAR"
+ *   "NO_FILTER"
+ *   "DONT_CARE"
+ *   "DEFAULT"
  *
  */
 class ImageRenderer: public ControlRenderer, public ConnectionTracker
@@ -165,9 +167,9 @@ public:
 private:
 
   /**
-   * @brief Applies the image to the material used for this renderer
+   * @brief Applies the image to the texture set used for this renderer
    *
-   * @param[in] image The Image to apply to the material used for this renderer
+   * @param[in] image The Image to apply to the texture set used for this renderer
    */
   void ApplyImageToSampler( const Image& image );
 
@@ -193,6 +195,13 @@ private:
   Renderer CreateRenderer() const;
 
   /**
+   * @brief Creates the Dali::Renderer for NativeImage with custom sampler type and prefix, initializing it
+   *
+   * @return Returns the created Dali::Renderer
+   */
+  Renderer CreateNativeImageRenderer() const;
+
+  /**
    * Callback function of image resource loading succeed
    * @param[in] image The Image content that we attempted to load from mImageUrl
    */
@@ -209,6 +218,11 @@ private:
    */
   void CleanCache(const std::string& url);
 
+  /**
+   * Set shader code for nativeimage if it exists
+   */
+  void SetNativeFragmentShaderCode( Dali::NativeImage& nativeImage );
+
 private:
   Image mImage;
   ImageAtlasManager& mAtlasManager;
@@ -217,6 +231,9 @@ private:
   Dali::ImageDimensions mDesiredSize;
   Dali::FittingMode::Type mFittingMode;
   Dali::SamplingMode::Type mSamplingMode;
+
+  std::string mNativeFragmentShaderCode;
+  bool mNativeImageFlag;
 };
 
 } // namespace Internal