NewRGBRadialShader
Vector graphics, Color
Description
This page describes NewRGBRadialShader in PDF Library for Delphi under the "Vector graphics, Color" topic. API names, parameters, class names, filenames, and literals are kept exactly as they appear in the Delphi library and DLL entry points.
NewRGBRadialShader registers a named two-circle radial gradient (ShadingType 3, ISO 32000-1 §8.7.4.5.3) that blends from a start colour on the start circle to an end colour on the end circle. It is the radial counterpart of NewRGBAxialShader; select the registered shader with SetFillShader, SetLineShader or SetTextShader and draw as usual.
Syntax
Delphi
Function TPDFlib.NewRGBRadialShader(Const ShaderName: WideString; StartX, StartY, StartRadius, StartRed, StartGreen, StartBlue, EndX, EndY, EndRadius, EndRed, EndGreen, EndBlue: Double; Extend: Integer): Integer;
Parameters
ShaderName is the caller-chosen name used to select the shader later. StartX/StartY/StartRadius define the start circle and StartRed/StartGreen/StartBlue (0..1) its colour; EndX/EndY/EndRadius and EndRed/EndGreen/EndBlue define the end circle. A concentric pair with StartRadius 0 produces the classic circular "glow" gradient. Extend 1 continues both end colours beyond the circles, 0 stops the paint at the circles.
Return Values
Returns 1 when the shader is registered, or 0 when the name is already in use or a radius is negative.
Remarks
Coordinates and radii are in page units and follow the origin selected with SetOrigin. The shader carries a DeviceRGB exponential colour ramp; the resulting shading pattern renders in any conforming viewer and through the PDF Library for Delphi page renderer.