Debenu Quick PDF logo

NewCMYKAxialShader

Vector graphics, Color

Version history

This function was introduced in Quick PDF Library version 12.13.

Description

This function adds an axial shader to the current document. The color is varied linearly from one CMYK 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.NewCMYKAxialShader(ShaderName: WideString; StartX, 
  StartY, StartCyan, StartMagenta, StartYellow, StartBlack, EndX, EndY, EndCyan, 
  EndMagenta, EndYellow, EndBlack: Double; Extend: Integer): Integer;

ActiveX

Function DebenuPDFLibrary1811.PDFLibrary::NewCMYKAxialShader(ShaderName As String,
  StartX As Double, StartY As Double, StartCyan As Double,
  StartMagenta As Double, StartYellow As Double, StartBlack As Double,
  EndX As Double, EndY As Double, EndCyan As Double, EndMagenta As Double,
  EndYellow As Double, EndBlack As Double, Extend As Long) As Long

DLL

int DPLNewCMYKAxialShader(int InstanceID, wchar_t * ShaderName, double StartX,
  double StartY, double StartCyan, double StartMagenta,
  double StartYellow, double StartBlack, double EndX, double EndY,
  double EndCyan, double EndMagenta, double EndYellow, double EndBlack,
  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
StartCyan The cyan component of the start color
StartMagenta The magenta component of the start color
StartYellow The yellow component of the start color
StartBlack The black component of the start color
EndX The horizontal co-ordinate of the end point
EndY The vertical co-ordinate of the end point
EndCyan The cyan component of the end color
EndMagenta The magenta component of the end color
EndYellow The yellow component of the end color
EndBlack The black 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