Spec-Zone.ru › Qt

CanvasGradient QML Type

Provides an opaque CanvasGradient interface. More...

Import Statement: import QtQuick
Since: Qt 5.0
  • List of all members, including inherited members

Methods

  • CanvasGradient addColorStop(real offset, string color)

Detailed Description

Method Documentation

CanvasGradient addColorStop(real offset, string color)

Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.

For example:

var gradient = ctx.createLinearGradient(0, 0, 100, 100);
gradient.addColorStop(0.3, Qt.rgba(1, 0, 0, 1));
gradient.addColorStop(0.7, 'rgba(0, 255, 255, 1');

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qml-qtquick-canvasgradient.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API