Use a GraphicsGradientFill object with the Graphics.drawGraphicsData() method. Drawing a GraphicsGradientFill object is the equivalent of calling the Graphics.beginGradientFill() method.


Can be created with method new:

Lib.Media.Display.GraphicsGradientFill.new(type, colors, alphas, ratios, matrix, spreadMethod, interpolationMethod, focalPointRatio)

Creates a new GraphicsGradientFill object.

type - (default = "linear") - A value from the GradientType object that specifies which gradient type to use: GradientType.LINEAR or GradientType.RADIAL.

colors - (default = nil) - An array of RGB hexadecimal color values used in the gradient; for example, red is 0xFF0000, blue is 0x0000FF, and so on. You can specify up to 15 colors. For each color, specify a corresponding value in the alphas and ratios parameters.

alphas - (default = nil) - An array of alpha values for the corresponding colors in the colors array; valid values are 0 to 1. If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used.

ratios - (default = nil) - An array of color distribution ratios; valid values are 0-255. This value defines the percentage of the width where the color is sampled at 100%. The value 0 represents the left position in the gradient box, and 255 represents the right position in the gradient box.

matrix - (default = nil) - A transformation matrix as defined by the Matrix object. The Matrix object includes a createGradientBox() method, which lets you conveniently set up the matrix for use with the beginGradientFill() method.

spreadMethod - (default = pad) - A value from the SpreadMethod object that specifies which spread method to use, either: SpreadMethod.PAD, SpreadMethod.REFLECT, or SpreadMethod.REPEAT.

interpolationMethod - (default = "rgb") - A value from the InterpolationMethod object that specifies which value to use: InterpolationMethod.LINEAR_RGB or InterpolationMethod.RGB

focalPointRatio - (default = 0.0) - A number that controls the location of the focal point of the gradient. A value of 0 sets the focal point in the center. A value of 1 sets the focal point at one border of the gradient circle. A value of -1 sets the focal point at the other border of the gradient circle. A value less than -1 or greater than 1 is rounded to -1 or 1, respectively.


Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files