X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fshader-effects%2Falpha-discard-effect.h;h=e782f78b388fe09c9e71b416ec7578215ec0f70e;hb=4bcf7c57006f4241565c31c13dde06b8eea99855;hp=c96f143fa5b618216116b48275878cbe925eb41a;hpb=820c66e71516e7a25600b8b5de2e84b5d44d8ff3;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h b/dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h index c96f143..e782f78 100644 --- a/dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h +++ b/dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_ALPHA_DISCARD_EFFECT_H__ -#define __DALI_TOOLKIT_ALPHA_DISCARD_EFFECT_H__ +#ifndef DALI_TOOLKIT_ALPHA_DISCARD_EFFECT_H +#define DALI_TOOLKIT_ALPHA_DISCARD_EFFECT_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -19,53 +19,33 @@ */ // EXTERNAL INCLUDES -#include +#include + +// INTERNAL INCLUDES +#include namespace Dali { - namespace Toolkit { - /** + * @brief Creates a new Alpha discard effect + * * Alpha discard effect is used to discard fragments when the alpha colour value is below a threshold. * This is useful for stenciling. * * Usage example: * - * ImageActor actor = ImageActor::New( Image( EXAMPLE_IMAGE_PATH ) ); - * AlphaDiscardEffect alphaDiscardEffect = AlphaDiscardEffect::New(); - * actor.SetShaderEffect( alphaDiscardEffect ); + * ImageView actor = ImageView::New( EXAMPLE_IMAGE_PATH ); + * Property::Map alphaDiscardEffect = CreateAlphaDiscardEffect(); + * actor.SetProperty( ImageView::Property::IMAGE, alphaDiscardEffect ); + * + * @return A property map of the required shaders. */ -class DALI_IMPORT_API AlphaDiscardEffect : public ShaderEffect -{ -public: - - /** - * Create an empty AlphaDiscardEffect handle. - */ - AlphaDiscardEffect(); - - /** - * @brief Destructor - * - * This is non-virtual since derived Handle types must not contain data or virtual methods. - */ - ~AlphaDiscardEffect(); - - /** - * Create a AlphaDiscardEffect. - * @return A handle to a newly allocated AlphaDiscardEffect. - */ - static AlphaDiscardEffect New(); - -private: // Not intended for application developers - - DALI_INTERNAL AlphaDiscardEffect( ShaderEffect handle ); -}; +DALI_TOOLKIT_API Property::Map CreateAlphaDiscardEffect(); } // namespace Toolkit } // namespace Dali -#endif // __DALI_TOOLKIT_ALPHA_DISCARD_EFFECT_H__ +#endif // DALI_TOOLKIT_ALPHA_DISCARD_EFFECT_H