[Tizen] Fix Coverity issues
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / pixel-buffer.h
index 35dc777..2a9add4 100755 (executable)
@@ -134,6 +134,17 @@ public:
   unsigned char* GetBuffer();
 
   /**
+   * @brief Gets the pixel buffer. This is a pointer to the internal
+   * pixel buffer.
+   *
+   * @warning If there is no pixel buffer (e.g. this object has been
+   * converted to a PixelData), this method will return NULL.
+   *
+   * @return The pixel buffer, or NULL.
+   */
+  const unsigned char* const GetBuffer() const;
+
+  /**
    * @brief Gets the width of the buffer in pixels.
    *
    * @SINCE_1_2.46
@@ -205,7 +216,7 @@ public:
   void Resize( uint16_t width, uint16_t height );
 
   /**
-   * Returns Exif metadata as a property map
+   * @brief Returns Exif metadata as a property map
    *
    * @param[out] metadata Property map object to write into
    * @return True on success
@@ -213,11 +224,30 @@ public:
   bool GetMetadata( Property::Map& metadata ) const;
 
   /**
-   * Multiplies the image's color values by the alpha value. This provides better
+   * @brief Multiplies the image's color values by the alpha value. This provides better
    * blending capability.
    */
   void MultiplyColorByAlpha();
 
+  /**
+   * @brief Rotates the pixel buffer by the given angle.
+   *
+   * @note Operation valid for pixel formats: A8, L8, LA88, RGB888, RGB8888, BGR8888, RGBA8888 and BGRA8888. Fails otherwise.
+   * @note The operation does nothing for angles equivalent to 0 degrees: -360, 360, 720, etc.
+   * @note If the pixel buffer does rotate, all the pointers to the internal pixel buffer retrieved by the method GetPixelBuffer() become invalid.
+   *
+   * @param[in] angle The angle in degrees.
+   *
+   * @return @e false if the rotation fails (invalid pixel format or memory issues).
+   */
+  bool Rotate( Degree angle );
+
+  /**
+   * @brief Returns pixel-buffer is premultiplied or not.
+   * @return true if alpha is pre-multiplied.
+   */
+  bool IsAlphaPreMultiplied() const;
+
 public:
 
   /**