Merge "DALi Version 1.3.43" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / pixel-buffer.h
old mode 100644 (file)
new mode 100755 (executable)
index 4da7620..a63a623
@@ -2,7 +2,7 @@
 #define DALI_PIXEL_BUFFER_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,6 +23,9 @@
 #include <dali/public-api/images/pixel-data.h>
 #include <dali/public-api/object/base-handle.h>
 
+// INTERNAL INCLUDES
+#include <dali/public-api/dali-adaptor-common.h>
+
 namespace Dali
 {
 
@@ -55,7 +58,7 @@ namespace Devel
  *
  * @SINCE_1_2.46
  */
-class DALI_IMPORT_API PixelBuffer : public BaseHandle
+class DALI_ADAPTOR_API PixelBuffer : public BaseHandle
 {
 public:
 
@@ -202,7 +205,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
@@ -210,11 +213,24 @@ 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 );
+
 public:
 
   /**