Gradient.PixelStop

Defines a gradient color stop based on an explicit pixel offset.

Rectangle {
    width: 100
    height: 100

    gradient: Gradient.Linear {
        Gradient.PixelStop { 
            stop: 0
            color: #red
        }
        Gradient.PixelStop { 
            stop: 50
            color: #orange
        }
        Gradient.PixelStop { 
            stop: 100
            color: #lime
        }
    }
}

To specify the stop as a percentage offset, use Gradient.Stop.

property Float stop: 0

The pixel offset.

property Color color: #black

The stop color.