Formatting API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / image-loader / image-atlas.cpp
index 84903b3..fcbeed8 100644 (file)
@@ -1,5 +1,5 @@
- /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+/*
+ * Copyright (c) 2020 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.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 ImageAtlas::ImageAtlas()
 {
 }
@@ -35,77 +33,75 @@ ImageAtlas::~ImageAtlas()
 {
 }
 
-Texture ImageAtlas::PackToAtlas( const std::vector<PixelData>& pixelData, Dali::Vector<Vector4>& textureRects  )
+Texture ImageAtlas::PackToAtlas(const std::vector<PixelData>& pixelData, Dali::Vector<Vector4>& textureRects)
 {
-  return Internal::ImageAtlas::PackToAtlas( pixelData, textureRects );
+  return Internal::ImageAtlas::PackToAtlas(pixelData, textureRects);
 }
 
 ImageAtlas::ImageAtlas(Internal::ImageAtlas* internal)
-: BaseHandle( internal )
+: BaseHandle(internal)
 {
 }
 
-ImageAtlas::ImageAtlas( const ImageAtlas& handle )
-: BaseHandle( handle )
+ImageAtlas::ImageAtlas(const ImageAtlas& handle)
+: BaseHandle(handle)
 {
 }
 
-ImageAtlas& ImageAtlas::operator=( const ImageAtlas& handle )
+ImageAtlas& ImageAtlas::operator=(const ImageAtlas& handle)
 {
   BaseHandle::operator=(handle);
   return *this;
 }
 
-ImageAtlas ImageAtlas::New(SizeType width, SizeType height,
-                           Pixel::Format pixelFormat)
+ImageAtlas ImageAtlas::New(SizeType width, SizeType height, Pixel::Format pixelFormat)
 {
-  IntrusivePtr<Internal::ImageAtlas> internal = Internal::ImageAtlas::New( width, height, pixelFormat);
-  return ImageAtlas( internal.Get() );
+  IntrusivePtr<Internal::ImageAtlas> internal = Internal::ImageAtlas::New(width, height, pixelFormat);
+  return ImageAtlas(internal.Get());
 }
 
 Texture ImageAtlas::GetAtlas()
 {
-  return GetImplementation( *this ).GetAtlas();
+  return GetImplementation(*this).GetAtlas();
 }
 
 float ImageAtlas::GetOccupancyRate() const
 {
-  return GetImplementation( *this ).GetOccupancyRate();
+  return GetImplementation(*this).GetOccupancyRate();
 }
 
-
-void ImageAtlas::SetBrokenImage( const std::string& brokenImageUrl )
+void ImageAtlas::SetBrokenImage(const std::string& brokenImageUrl)
 {
-  GetImplementation( *this ).SetBrokenImage( brokenImageUrl );
+  GetImplementation(*this).SetBrokenImage(brokenImageUrl);
 }
 
-bool ImageAtlas::Upload( Vector4& textureRect,
-                         const std::string& url,
-                         ImageDimensions size,
-                         FittingMode::Type fittingMode,
-                         bool orientationCorrection )
+bool ImageAtlas::Upload(Vector4&           textureRect,
+                        const std::string& url,
+                        ImageDimensions    size,
+                        FittingMode::Type  fittingMode,
+                        bool               orientationCorrection)
 {
-  return Upload( textureRect, url, size, fittingMode, orientationCorrection, NULL );
+  return Upload(textureRect, url, size, fittingMode, orientationCorrection, NULL);
 }
 
-bool ImageAtlas::Upload( Vector4& textureRect,
-                         const std::string& url,
-                         ImageDimensions size,
-                         FittingMode::Type fittingMode,
-                         bool orientationCorrection,
-                         AtlasUploadObserver* atlasUploadObserver )
+bool ImageAtlas::Upload(Vector4&             textureRect,
+                        const std::string&   url,
+                        ImageDimensions      size,
+                        FittingMode::Type    fittingMode,
+                        bool                 orientationCorrection,
+                        AtlasUploadObserver* atlasUploadObserver)
 {
-  return GetImplementation(*this).Upload( textureRect, url, size, fittingMode, orientationCorrection, atlasUploadObserver );
+  return GetImplementation(*this).Upload(textureRect, url, size, fittingMode, orientationCorrection, atlasUploadObserver);
 }
 
-bool ImageAtlas::Upload( Vector4& textureRect, PixelData pixelData )
+bool ImageAtlas::Upload(Vector4& textureRect, PixelData pixelData)
 {
-  return GetImplementation(*this).Upload( textureRect, pixelData );
+  return GetImplementation(*this).Upload(textureRect, pixelData);
 }
 
 void ImageAtlas::Remove(const Vector4& textureRect)
 {
-  GetImplementation(*this).Remove( textureRect );
+  GetImplementation(*this).Remove(textureRect);
 }
 
 } // namespace Toolkit