NewRGBAxialShader

Vector graphics, Color

Description

This function adds an axial shader to the current document. The color is varied linearly from one color to another between two points and is used for linear gradient fills.

The shader can be used with the SetTextShader, SetLineShader and SetFillShader functions to set the color of subsequently drawn vector graphics and text.

Syntax

Parameters

ShaderName

The name of the shader. Should be a simple string consisting of alphanumeric characters and no whitespace. This name is used with the SetTextShader, SetLineShader and SetFillShader functions.

StartX

The horizontal co-ordinate of the start point

StartY

The vertical co-ordinate of the start point

The red component of the start color

StartRed

StartGreen

The green component of the start color

StartBlue

The blue component of the start color

The horizontal co-ordinate of the end point

EndX

EndY

The vertical co-ordinate of the end point

EndRed

The red component of the end color

The green component of the end color

EndGreen

EndBlue

The blue component of the end color

Extend

0 = do not extend the beyond the start and end points

1 = extend the shader using solid color

Return values

0The shader could not be added, possibly a shader with this name has already been added
1The shader was added successfully double StartGreen, double StartBlue, double EndX, double EndY, double EndRed, double EndGreen, double EndBlue, int Extend);