X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fimage-atlas-manager.h;h=ec7a402f69a114240b6b53a7c237965891396a63;hb=ff6ce970724ccc8bee65f7c93411b274907c09d7;hp=d2630c186730eaf136958502664b7218f92baefe;hpb=b02f35593b1eb71f9b903a17599ae52a2f43a1e2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/image-atlas-manager.h b/dali-toolkit/internal/visuals/image-atlas-manager.h index d2630c1..ec7a402 100644 --- a/dali-toolkit/internal/visuals/image-atlas-manager.h +++ b/dali-toolkit/internal/visuals/image-atlas-manager.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_IMAGE_ATLAS_MANAGER_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -18,6 +18,7 @@ */ // EXTERNAL INCLUDES +#include #include #include #include @@ -82,6 +83,29 @@ public: FittingMode::Type fittingMode = FittingMode::DEFAULT, bool orientationCorrection = true, AtlasUploadObserver* atlasUploadObserver = NULL); + + /** + * @brief Add an image to the atlas. + * + * @note To make the atlasing efficient, an valid size should be provided. + * + * SamplingMode::BOX_THEN_LINEAR is used to sampling pixels from the input image while fitting it to desired size. + * + * @param [out] textureRect The texture area of the resource image in the atlas. + * @param [in] encodedImageBuffer The encoded buffer of the resource image file to use. + * @param [in] size The width and height to fit the loaded image to. + * @param [in] fittingMode The method used to fit the shape of the image before loading to the shape defined by the size parameter. + * @param [in] orientationCorrection Reorient the image to respect any orientation metadata in its header. + * @param [in] atlasUploadObserver The object to observe the uploading state inside ImageAtlas. + * @return The texture set containing the image. + */ + TextureSet Add(Vector4& textureRect, + const EncodedImageBuffer& encodedImageBuffer, + const ImageDimensions& size, + FittingMode::Type fittingMode = FittingMode::DEFAULT, + bool orientationCorrection = true, + AtlasUploadObserver* atlasUploadObserver = NULL); + /** * @brief Add a pixel buffer to the atlas *