SplineControlAnimation QML Type

一种动画类型,用于表示花键控制点的动画。更多

Import Statement: import QtGraphs
Inherits:

XYSeriesAnimation

属性

详细说明

SplineControlAnimation 是一种从QVariantAnimation 派生的动画类型,它定义了样条曲线控制点的动画方式。它可以使用QVariantAnimation 的功能和属性来制作动画,如durationeasing 。这些动画位于QParallelAnimationGroup 中,因此将并行运行。该动画不会影响SplineSeries 的主要点,而只会影响点两侧的两个控制柄。每个控制点都是连续线性插值的。

本示例展示了如何使用 SplineControlPointAnimation 和GraphPointAnimationSplineSeries 的主系列点和控制点定义动画:

import QtGraphs

GraphsView {
    SplineSeries {
        GraphTransition {
            GraphPointAnimation { duration: 1000; easingCurve.type: Easing.OutCubic  }
            SplineControlAnimation { duration: 1000; easingCurve.type: Easing.OutCubic }
        }
    }
}

另请参阅 GraphTransitionGraphPointAnimation

属性文档

AnimationState : enumeration

动画状态。

常量说明
Playing动画正在播放。
Stopped动画停止。

GraphAnimationType : enumeration

动画类型。

常量说明
GraphPointGraphPointAnimation 动画。
ControlPointControlPointAnimation 动画。

animating : GraphAnimation::AnimationState

保持动画状态。GraphAnimation::AnimationState 中的一个。


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.