Click or drag to resize
Pdf Library for .NET

PdfGradientDirection Enumeration

The direction of a gradient fill.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public enum PdfGradientDirection
Members
Member nameValueDescription
Horizontal0 Horizontal gradient (left to right).
Vertical1 Vertical gradient (top to bottom).
ForwardDiagonal2 Diagonal gradient from top-left to bottom-right.
BackwardDiagonal3 Diagonal gradient from top-right to bottom-left.
Example
PdfGradient gradient =
    new PdfGradient(new PdfColor(255, 0, 0), new PdfColor(0, 0, 255));
gradient.GradientDirection = PdfGradientDirection.Vertical;
See Also