2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 using System.ComponentModel;
22 using Tizen.NUI.BaseComponents;
25 /// ScaleTransition provides smoothly appearing/disappearing scale effects for target View.
26 /// If this transition is for appearing, the View comes out with the scale factor applied
27 /// and will be animated at its original scale.
28 /// If this transition is for disappearing, the View starts at its original size
29 /// but will become the scale of scale factor and vanished.
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public class ScaleTransition : TransitionBase
35 /// Create a ScaleTransition.
37 [EditorBrowsable(EditorBrowsableState.Never)]
38 public ScaleTransition()
43 /// Set/get Scale factor for this scale transition.
44 /// if AppearingTransition, transition starts from scaled by the ScaleFactor and is animated to the original size.
45 /// And if DisappearingTransition, transition is finished to the scaled state by the ScaleFactor.
47 /// Default ScaleFactor is Vector2(0.5f, 0.5f).
49 [EditorBrowsable(EditorBrowsableState.Never)]
50 public Vector2 ScaleFactor { get; set; } = new Vector2(0.5f, 0.5f);
52 internal override TransitionItemBase CreateTransition(View view, bool isAppearing)
54 ScaleTransitionItem scale = new ScaleTransitionItem(view, ScaleFactor, isAppearing, GetTimePeriod(), GetAlphaFunction());