X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Farc%2Farc-visual.h;h=011b94661c0ba43a9a8e22cc465910f019adae50;hp=3de0473ee4cb85451461f7a5679da9fcf1f7513e;hb=d2a6f4d721fbc03b51d4f1328a58b1fa65f90d43;hpb=564e9d67ee51b52b668e9791c13e14beeb63220e diff --git a/dali-toolkit/internal/visuals/arc/arc-visual.h b/dali-toolkit/internal/visuals/arc/arc-visual.h index 3de0473..011b946 100644 --- a/dali-toolkit/internal/visuals/arc/arc-visual.h +++ b/dali-toolkit/internal/visuals/arc/arc-visual.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_ARC_VISUAL_H /* - * Copyright (c) 2020 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. @@ -22,20 +22,17 @@ #include // INTERNAL INCLUDES -#include #include +#include namespace Dali { - namespace Toolkit { - namespace Internal { - class ArcVisual; -typedef IntrusivePtr< ArcVisual > ArcVisualPtr; +typedef IntrusivePtr ArcVisualPtr; /** * The visual which renders an arc to the control's quad @@ -49,10 +46,9 @@ typedef IntrusivePtr< ArcVisual > ArcVisualPtr; * | SWEEP_ANGLE | FLOAT | * | CAP | INTEGER | */ -class ArcVisual: public Visual::Base +class ArcVisual : public Visual::Base { public: - /** * @brief Create a new arc visual. * @@ -60,28 +56,26 @@ public: * @param[in] properties A Property::Map containing settings for this visual * @return A smart-pointer to the newly allocated visual. */ - static ArcVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties ); - -public: // from Visual + static ArcVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties); +public: // from Visual /** * @copydoc Visual::Base::CreatePropertyMap */ - void DoCreatePropertyMap( Property::Map& map ) const override; + void DoCreatePropertyMap(Property::Map& map) const override; /** * @copydoc Visual::Base::CreateInstancePropertyMap */ - void DoCreateInstancePropertyMap( Property::Map& map ) const override; + void DoCreateInstancePropertyMap(Property::Map& map) const override; protected: - /** * @brief Constructor. * * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object */ - ArcVisual( VisualFactoryCache& factoryCache ); + ArcVisual(VisualFactoryCache& factoryCache); /** * @brief A reference counted object may only be deleted by calling Unreference(). @@ -89,51 +83,47 @@ protected: virtual ~ArcVisual(); /** - * @copydoc Visual::Base::DoSetProperties + * @copydoc Visual::Base::OnInitialize */ - void DoSetProperties( const Property::Map& propertyMap ) override; + void OnInitialize() override; /** - * @copydoc Visual::Base::DoSetOnStage + * @copydoc Visual::Base::DoSetProperties */ - void DoSetOnStage( Actor& actor ) override; + void DoSetProperties(const Property::Map& propertyMap) override; /** - * @copydoc Visual::Base::OnSetTransform + * @copydoc Visual::Base::DoSetOnScene */ - void OnSetTransform() override; + void DoSetOnScene(Actor& actor) override; /** - * @copydoc Visual::Base::OnDoAction + * @copydoc Visual::Base::DoSetOffScene */ - void OnDoAction( const Property::Index actionId, const Property::Value& attributes ) override; - -private: + void DoSetOffScene(Actor& actor) override; /** - * @brief Initialize the renderer with the geometry and shader from the cache, if not available, create and save to the cache for sharing. + * @copydoc Visual::Base::OnSetTransform */ - void InitializeRenderer(); + void OnSetTransform() override; private: - // Undefined - ArcVisual( const ArcVisual& arcVisual ) = delete; + ArcVisual(const ArcVisual& arcVisual) = delete; // Undefined - ArcVisual& operator=( const ArcVisual& arcVisual ) = delete; + ArcVisual& operator=(const ArcVisual& arcVisual) = delete; private: - - float mThickness; ///< The thickness of the arc. - float mRadius; ///< The radius of the arc. - float mStartAngle; ///< The start angle of the arc. - float mSweepAngle; ///< The sweep angle of the arc. - Property::Index mRadiusIndex; ///< The index of the radius property. - Property::Index mThicknessIndex; ///< The index of the thickness property. - Property::Index mStartAngleIndex; ///< The index of the start angle property. - Property::Index mSweepAngleIndex; ///< The index of the sweep angle property. - DevelArcVisual::Cap::Type mCapType; ///< The cap type. + float mThickness; ///< The thickness of the arc. + float mRadius; ///< The radius of the arc. + float mStartAngle; ///< The start angle of the arc. + float mSweepAngle; ///< The sweep angle of the arc. + Property::Index mRadiusIndex; ///< The index of the radius property. + Property::Index mThicknessIndex; ///< The index of the thickness property. + Property::Index mStartAngleIndex; ///< The index of the start angle property. + Property::Index mSweepAngleIndex; ///< The index of the sweep angle property. + DevelArcVisual::Cap::Type mCapType; ///< The cap type. }; } // namespace Internal