DALi Version 1.3.30
[platform/core/uifw/dali-core.git] / dali / internal / event / images / encoded-buffer-image-impl.h
index d3c46ef..26fb1ae 100644 (file)
@@ -1,21 +1,22 @@
 #ifndef __DALI_INTERNAL_ENCODED_BUFFER_IMAGE_H__
 #define __DALI_INTERNAL_ENCODED_BUFFER_IMAGE_H__
 
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // INTERNAL INCLUDES
 #include <dali/public-api/object/ref-object.h>
@@ -31,9 +32,6 @@ namespace Internal
 class EncodedBufferImage;
 typedef IntrusivePtr<EncodedBufferImage> EncodedBufferImagePtr;
 
-class ResourceClient;
-class ResourceManager;
-
 namespace SceneGraph
 {
 class UpdateManager;
@@ -51,7 +49,7 @@ private:
   /**
    * Construct using the supplied load policy.
    */
-  EncodedBufferImage(ReleasePolicy releasePol=ImageReleasePolicyDefault) : Image( Dali::Image::Immediate, releasePol ) {}
+  EncodedBufferImage() : Image() {}
 
 public:
   /**
@@ -63,15 +61,15 @@ public:
    * discard it as soon as the function returns.
    * @param [in] encodedImageByteCount The size in bytes of the buffer pointed to
    * by encodedImage.
-   * @param [in] attributes Requested parameters for loading (size, cropping etc.).
-   * @param [in] releasePol The ReleasePolicy to apply to image. Since it cannot
-   * be recreated by dali, the default of Never will usually make sense.
+   * @param [in] attributes Requested parameters for loading (size, scaling etc.).
    * @return A pointer to a newly allocated object, or null on error.
    */
-  static Dali::EncodedBufferImage New(const uint8_t * const encodedImage,
-                   const std::size_t encodedImageByteCount,
-                   const ImageAttributes& attributes,
-                   const ReleasePolicy releasePol=Dali::Image::Never);
+  static EncodedBufferImagePtr New(const uint8_t * const encodedImage,
+                                   const std::size_t encodedImageByteCount,
+                                   ImageDimensions size = ImageDimensions(0, 0),
+                                   FittingMode::Type scalingMode = FittingMode::SHRINK_TO_FIT,
+                                   SamplingMode::Type samplingMode = SamplingMode::BOX,
+                                   bool orientationCorrection = true);
 };
 
 } // namespace Internal