Debenu Quick PDF logo

NewRGBAxialShader

Vector graphics, Color

Version history

This function was introduced in Quick PDF Library version 7.11.

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

Delphi

function TDebenuPDFLibrary1811.NewRGBAxialShader(ShaderName: WideString; StartX, 
  StartY, StartRed, StartGreen, StartBlue, EndX, EndY, EndRed, EndGreen, 
  EndBlue: Double; Extend: Integer): Integer;

ActiveX

Function DebenuPDFLibrary1811.PDFLibrary::NewRGBAxialShader(ShaderName As String,
  StartX As Double, StartY As Double, StartRed As Double,
  StartGreen As Double, StartBlue As Double, EndX As Double,
  EndY As Double, EndRed As Double, EndGreen As Double, EndBlue As Double,
  Extend As Long) As Long

DLL

int DPLNewRGBAxialShader(int InstanceID, wchar_t * 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
StartRed The red component of the start color
StartGreen The green component of the start color
StartBlue The blue component of the start color
EndX The horizontal co-ordinate of the end point
EndY The vertical co-ordinate of the end point
EndRed The red component of the end color
EndGreen The green component of the end color
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

Copyright © 2020 Debenu. All rights reserved. AboutContactBlogNewsletterSupport