comp • gb.qt4 • paint • lineargradient

Paint.LinearGradient (gb.qt4)

Static Function LinearGradient ( X0 As Float, Y0 As Float, X1 As Float, Y1 As Float, Colors As Integer[], Positions As Float[] [ , Extend As Integer ] ) As PaintBrush

Creates a new linear gradient brush along the line defined by (X0, Y0) and (X1, Y1), and using color stops defined by the Colors and Positions arguments.

  • X0 : x coordinate of the start point.

  • Y0 : y coordinate of the start point.

  • X1 : x coordinate of the end point.

  • Y1 : y coordinate of the end point.

  • Colors : an array of colors.

  • Positions : the position of each color, 0 being the gradient start, and 1 the gradient end.

The coordinates here are in brush space. For a new brush, brush space is identical to user space, but the relationship between the spaces can be changed by setting the PaintBrush.Matrix property.