CanvasGradient QML Type
|Import Statement:||import QtQuick 2.5|
- CanvasGradient addColorStop(real offsetof, string color)
CanvasGradient addColorStop(real offsetof, 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.
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');
© 2016 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.