X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fvisual-factory%2Fvisual-factory.h;h=0a8675496c20aebf1f0df3cdf71274c2c0a5b071;hb=072e6002280ed51a637ed54e0451bdbbe3c4ec79;hp=25c17ccf517920d5643e244cdbe50c6f2abd95ab;hpb=fc829906bc88730e08c8d483a351bd1a1ffc563f;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/visual-factory/visual-factory.h b/dali-toolkit/devel-api/visual-factory/visual-factory.h index 25c17cc..0a86754 100644 --- a/dali-toolkit/devel-api/visual-factory/visual-factory.h +++ b/dali-toolkit/devel-api/visual-factory/visual-factory.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_VISUAL_FACTORY_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -29,7 +29,7 @@ namespace Dali { class Image; -class Vector4; +struct Vector4; namespace Toolkit { @@ -51,7 +51,7 @@ class VisualFactory; * | visualType | INTEGER or STRING | * | shader | MAP | */ -class DALI_IMPORT_API VisualFactory : public BaseHandle +class DALI_TOOLKIT_API VisualFactory : public BaseHandle { public: @@ -117,6 +117,25 @@ public: */ Visual::Base CreateVisual( const std::string& url, ImageDimensions size ); + /** + * @brief Enable or disable premultiplying alpha in images and image visuals. + * + * The default is to enable pre-multiplication on load. + * + * Applications that have assets with pre-multiplied alpha already applied should turn this option off. + * + * @param[in] preMultiply True if loaded images for image visuals should have alpha multiplied into the color + * channels. + */ + void SetPreMultiplyOnLoad( bool preMultiply ); + + /** + * @brief Get the setting for automatically pre-multiplying image visual images on load. + * + * @return True if loaded images have pre-multiplied alpha applied on load, false otherwise. + */ + bool GetPreMultiplyOnLoad() const; + private: explicit DALI_INTERNAL VisualFactory(Internal::VisualFactory *impl);