NewRGBAxialShaderA
Vector graphics, Color
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to NewRGBAxialShader and string arguments are interpreted using the current SetAnsiMode code page
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
Delphi
Function DLNewRGBAxialShaderA(InstanceID: Integer; ShaderName: PAnsiChar; StartX, StartY, StartRed, StartGreen, StartBlue, EndX, EndY, EndRed, EndGreen, EndBlue: Double; Extend: Integer): Integer;
DLL
int DLNewRGBAxialShaderA(int InstanceID, const char * ShaderName, double StartX, double StartY, double StartRed, double StartGreen, double StartBlue, double EndX, double EndY, double EndRed, double EndGreen, double EndBlue, int Extend);
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
| 0 | The shader could not be added, possibly a shader with this name has already been added |
|---|---|
| 1 | The shader was added successfully double StartGreen, double StartBlue, double EndX, double EndY, double EndRed, double EndGreen, double EndBlue, int Extend); |