1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_ANIMATION_CURVES_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_ANIMATION_CURVES_H 18 19 #include "base/utils/macros.h" 20 #include "core/animation/anticipate_curve.h" 21 #include "core/animation/cubic_curve.h" 22 23 namespace OHOS::Ace { 24 25 class ACE_FORCE_EXPORT Curves { 26 public: 27 Curves() = delete; 28 ~Curves() = default; 29 static const RefPtr<DecelerationCurve> DECELE; 30 static const RefPtr<LinearCurve> LINEAR; 31 static const RefPtr<SineCurve> SINE; 32 static const RefPtr<CubicCurve> EASE; 33 static const RefPtr<CubicCurve> EASE_IN; 34 static const RefPtr<CubicCurve> EASE_OUT; 35 static const RefPtr<CubicCurve> EASE_IN_OUT; 36 static const RefPtr<CubicCurve> FAST_OUT_SLOW_IN; 37 static const RefPtr<CubicCurve> LINEAR_OUT_SLOW_IN; 38 static const RefPtr<CubicCurve> FAST_OUT_LINEAR_IN; 39 static const RefPtr<CubicCurve> FRICTION; 40 static const RefPtr<CubicCurve> EXTREME_DECELERATION; 41 static const RefPtr<CubicCurve> SHARP; 42 static const RefPtr<CubicCurve> RHYTHM; 43 static const RefPtr<CubicCurve> SMOOTH; 44 static const RefPtr<AnticipateCurve> ANTICIPATE; 45 static const RefPtr<CubicCurve> MAGNETIC; 46 static const RefPtr<ElasticsCurve> ELASTICS; 47 static const std::string DEFAULT_CURVE_NAME; 48 static std::string ToString(const RefPtr<Curve>& curve); 49 }; 50 51 } // namespace OHOS::Ace 52 53 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_ANIMATION_CURVES_H 54