-#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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/public-api/object/property-map.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/dali-toolkit-common.h>
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