Class PdfSeparationColor
Represents a separation color, based on a separation colorspace.
Namespace: Syncfusion.Pdf.ColorSpace
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfSeparationColor : PdfExtendedColor
Examples
// Creates a new document
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
// Creates ExponentialInterpolationFunction function
PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
float[] numArray = new float[4];
numArray[0] = 0.38f;
numArray[1] = 0.88f;
function.C1 = numArray;
// Creates SeparationColorSpace
PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
colorspace.TintTransform = function;
colorspace.Colorant = "PANTONE Orange 021 C";
PdfSeparationColor color = new PdfSeparationColor(colorspace);
color.Tint = 0.7;
RectangleF rect = new RectangleF(20, 70, 200, 100);
PdfPen pen = new PdfPen(color);
page.Graphics.DrawRectangle(pen, rect);
doc.Save("SeparationColor.pdf");
' Creates a new document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Creates ExponentialInterpolationFunction function
Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
Dim numArray() As Single = New Single(3){}
numArray(0) = 0.38f
numArray(1) = 0.88f
[function].C1 = numArray
' Creates SeparationColorSpace
Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
colorspace.TintTransform = [function]
colorspace.Colorant = "PANTONE Orange 021 C"
Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
color.Tint = 0.7
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
Dim pen As PdfPen = New PdfPen(color)
page.Graphics.DrawRectangle(pen, rect)
doc.Save("SeparationColor.pdf")
Constructors
PdfSeparationColor(PdfColorSpaces)
Initializes a new instance of the PdfSeparationColor class.
Declaration
public PdfSeparationColor(PdfColorSpaces colorspace)
Parameters
Type | Name | Description |
---|---|---|
PdfColorSpaces | colorspace | The colorspace. |
Examples
// Creates a new document
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
// Creates ExponentialInterpolationFunction function
PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
float[] numArray = new float[4];
numArray[0] = 0.38f;
numArray[1] = 0.88f;
function.C1 = numArray;
// Creates SeparationColorSpace
PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
colorspace.TintTransform = function;
colorspace.Colorant = "PANTONE Orange 021 C";
PdfSeparationColor color = new PdfSeparationColor(colorspace);
color.Tint = 0.7;
RectangleF rect = new RectangleF(20, 70, 200, 100);
PdfPen pen = new PdfPen(color);
page.Graphics.DrawRectangle(pen, rect);
doc.Save("SeparationColor.pdf");
' Creates a new document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Creates ExponentialInterpolationFunction function
Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
Dim numArray() As Single = New Single(3){}
numArray(0) = 0.38f
numArray(1) = 0.88f
[function].C1 = numArray
' Creates SeparationColorSpace
Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
colorspace.TintTransform = [function]
colorspace.Colorant = "PANTONE Orange 021 C"
Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
color.Tint = 0.7
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
Dim pen As PdfPen = New PdfPen(color)
page.Graphics.DrawRectangle(pen, rect)
doc.Save("SeparationColor.pdf")
See Also
Properties
Tint
Gets or sets the Tint Value.
Declaration
public double Tint { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A float value specifying the tint of this color. |
Remarks
The acceptable range for this value is [0.0 1.0]. 0.0 means the lightest color that can be achieved, and 1.0 means the darkest color.
Examples
// Creates a new document
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
// Creates ExponentialInterpolationFunction function
PdfExponentialInterpolationFunction function = new PdfExponentialInterpolationFunction(true);
float[] numArray = new float[4];
numArray[0] = 0.38f;
numArray[1] = 0.88f;
function.C1 = numArray;
// Creates SeparationColorSpace
PdfSeparationColorSpace colorspace = new PdfSeparationColorSpace();
colorspace.TintTransform = function;
colorspace.Colorant = "PANTONE Orange 021 C";
PdfSeparationColor color = new PdfSeparationColor(colorspace);
color.Tint = 0.7;
RectangleF rect = new RectangleF(20, 70, 200, 100);
PdfPen pen = new PdfPen(color);
page.Graphics.DrawRectangle(pen, rect);
doc.Save("SeparationColor.pdf");
' Creates a new document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Creates ExponentialInterpolationFunction function
Dim [function] As PdfExponentialInterpolationFunction = New PdfExponentialInterpolationFunction(True)
Dim numArray() As Single = New Single(3){}
numArray(0) = 0.38f
numArray(1) = 0.88f
[function].C1 = numArray
' Creates SeparationColorSpace
Dim colorspace As PdfSeparationColorSpace = New PdfSeparationColorSpace()
colorspace.TintTransform = [function]
colorspace.Colorant = "PANTONE Orange 021 C"
Dim color As PdfSeparationColor = New PdfSeparationColor(colorspace)
color.Tint = 0.7
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
Dim pen As PdfPen = New PdfPen(color)
page.Graphics.DrawRectangle(pen, rect)
doc.Save("SeparationColor.pdf")