X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fimage-loader%2Fimage.h;h=96b40f97bc59eaf71a97e6659851345a1162a49c;hb=HEAD;hp=1cf2550bcf58295714d9c92660c627fb1a103d6d;hpb=33f29d762e4410026a85521f05b7b66aa2d087d1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/image-loader/image.h b/dali-toolkit/public-api/image-loader/image.h index 1cf2550..96b40f9 100644 --- a/dali-toolkit/public-api/image-loader/image.h +++ b/dali-toolkit/public-api/image-loader/image.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_IMAGE_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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,26 +18,25 @@ */ // EXTERNAL INCLUDES +#include +#include #include #include -#include // INTERNAL INCLUDES #include +#include namespace Dali { - namespace Toolkit { - /** * API to interface with the toolkit image - * Allows developers to add FrameBuffer, PixelData and NativeImageSource to toolkit so that visuals can use them to render + * Allows developers to add FrameBuffer, PixelData and NativeImageInterface to toolkit so that visuals can use them to render */ namespace Image { - /** * @brief Generate a Url from frame buffer. * This Url can be used in visuals to render the frame buffer. @@ -47,9 +46,9 @@ namespace Image * @param[in] pixelFormat the pixel format for this frame buffer * @param[in] width the width for this frame buffer * @param[in] height the height for this frame buffer - * @return the Url string representing this frame buffer + * @return the ImageUrl representing this frame buffer */ -DALI_TOOLKIT_API std::string GenerateUrl( const Dali::FrameBuffer frameBuffer, Pixel::Format pixelFormat, uint32_t width, uint32_t height ); +DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateUrl(const Dali::FrameBuffer frameBuffer, Pixel::Format pixelFormat, uint32_t width, uint32_t height); /** * @brief Generate a Url from frame buffer. @@ -58,32 +57,52 @@ DALI_TOOLKIT_API std::string GenerateUrl( const Dali::FrameBuffer frameBuffer, P * This method does not check for duplicates, If same frame buffer is entered multiple times, a different URL is returned each time. * @param[in] frameBuffer the frame buffer to converted to Url * @param[in] index the index of the attached color texture. - * @return the Url string representing this frame buffer + * @return the ImageUrl representing this frame buffer */ -DALI_TOOLKIT_API std::string GenerateUrl( const Dali::FrameBuffer frameBuffer, uint8_t index ); +DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateUrl(const Dali::FrameBuffer frameBuffer, uint8_t index); /** * @brief Generate a Url from Pixel data. * This Url can be used in visuals to render the pixel data. * @note This method does not check for duplicates, If same pixel data is entered multiple times, a different URL is returned each time. * @param[in] pixelData the pixel data to converted to Url - * @return the Url string representing this pixel data + * @param[in] preMultiplied Whether this pixel data preMultiplied or not. Default as false. + * @return the ImageUrl representing this pixel data + */ +DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateUrl(const Dali::PixelData pixelData, bool preMultiplied = false); + +/** + * @brief Generate a Url from native image interface. + * This Url can be used in visuals to render the native image interface. + * @note This method does not check for duplicates, If same native image interface is entered multiple times, a different URL is returned each time. + * @param[in] nativeImageInterface the native image interface to converted to Url + * @param[in] preMultiplied Whether this native image interface preMultiplied or not. Default as false. + * @return the ImageUrl representing this native image interface */ -DALI_TOOLKIT_API std::string GenerateUrl( const Dali::PixelData pixelData ); +DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateUrl(const Dali::NativeImageInterfacePtr nativeImageInterface, bool preMultiplied = false); /** - * @brief Generate a Url from native image source. - * This Url can be used in visuals to render the native image source. - * @note This method does not check for duplicates, If same native image source is entered multiple times, a different URL is returned each time. - * @param[in] nativeImageSource the native image source to converted to Url - * @return the Url string representing this native image source + * @brief Generate a Url from encoded image buffer. + * This Url can be used in visuals to render the image. + * @note This method does not check for duplicates, If same encoded image buffer is entered multiple times, a different URL is returned each time. + * @param[in] encodedImageBuffer the encoded image buffer to converted to Url + * @return the ImageUrl representing this encoded image buffer + */ +DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateUrl(const Dali::EncodedImageBuffer encodedImageBuffer); + +/** + * @brief Generate a Url of depth texture from frame buffer. + * This Url can be used in visuals to render the frame buffer. + * This method does not check for duplicates, If same frame buffer is entered multiple times, a different URL is returned each time. + * @param[in] frameBuffer the frame buffer to converted to Url + * @return the ImageUrl representing this frame buffer */ -DALI_TOOLKIT_API std::string GenerateUrl( const Dali::NativeImageSourcePtr nativeImageSource ); +DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateDepthUrl(const Dali::FrameBuffer frameBuffer); -} // Image +} // namespace Image -} // Toolkit +} // namespace Toolkit -} // Dali +} // namespace Dali #endif // DALI_TOOLKIT_IMAGE_H