Class PdfLabColorSpace
Represents a Lab colorspace
Inherited Members
Namespace: Syncfusion.Pdf.ColorSpace
Assembly: Syncfusion.Pdf.Portable.dll
Syntax
public class PdfLabColorSpace : PdfColorSpaces, IPdfCache, IPdfWrapper
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();
// Create lab color space
PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
// Create lab color
PdfLabColor labColor = new PdfLabColor(calGrayCS);
labColor.L = 90;
labColor.A = 0.5;
labColor.B = 20;
PdfPen pen = new PdfPen(labColor);
RectangleF rect = new RectangleF(20, 70, 200, 100);
page.Graphics.DrawRectangle(pen, rect);
doc.Save("LabColor.pdf");
' Create a new document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Creates lab color space
Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
' Create lab color
Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
labColor.L = 90
labColor.A = 0.5
labColor.B = 20
Dim pen As PdfPen = New PdfPen(labColor)
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
page.Graphics.DrawRectangle(pen, rect)
doc.Save("LabColor.pdf")
Constructors
PdfLabColorSpace()
Initializes a new instance of the PdfLabColorSpace class.
Declaration
public PdfLabColorSpace()
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();
// Create lab color space
PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
// Create lab color
PdfLabColor labColor = new PdfLabColor(calGrayCS);
labColor.L = 90;
labColor.A = 0.5;
labColor.B = 20;
PdfPen pen = new PdfPen(labColor);
RectangleF rect = new RectangleF(20, 70, 200, 100);
page.Graphics.DrawRectangle(pen, rect);
doc.Save("LabColor.pdf");
' Create a new document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Creates lab color space
Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
' Create lab color
Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
labColor.L = 90
labColor.A = 0.5
labColor.B = 20
Dim pen As PdfPen = New PdfPen(labColor)
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
page.Graphics.DrawRectangle(pen, rect)
doc.Save("LabColor.pdf")
See Also
Properties
BlackPoint
Gets or sets BlackPoint
Declaration
public double[] BlackPoint { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] | An array of three numbers [XB YB ZB] specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. |
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();
// Create lab color space
PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
calGrayCS.BlackPoint = new double[] { 0.2, 1, 0.8 };
// Create lab color
PdfLabColor labColor = new PdfLabColor(calGrayCS);
labColor.L = 90;
labColor.A = 0.5;
labColor.B = 20;
PdfPen pen = new PdfPen(labColor);
RectangleF rect = new RectangleF(20, 70, 200, 100);
page.Graphics.DrawRectangle(pen, rect);
doc.Save("LabColor.pdf");
' Create a new document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Creates lab color space
Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
calGrayCS.BlackPoint = New Double() { 0.2, 1, 0.8 }
' Create lab color
Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
labColor.L = 90
labColor.A = 0.5
labColor.B = 20
Dim pen As PdfPen = New PdfPen(labColor)
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
page.Graphics.DrawRectangle(pen, rect)
doc.Save("LabColor.pdf")
See Also
Range
Gets or sets the Range
Declaration
public double[] Range { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] | An array of three numbers [XB YB ZB] specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. |
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();
// Create lab color space
PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
// Create lab color
PdfLabColor labColor = new PdfLabColor(calGrayCS);
labColor.L = 90;
labColor.A = 0.5;
labColor.B = 20;
PdfPen pen = new PdfPen(labColor);
RectangleF rect = new RectangleF(20, 70, 200, 100);
page.Graphics.DrawRectangle(pen, rect);
doc.Save("LabColor.pdf");
' Create a new document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Creates lab color space
Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
' Create lab color
Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
labColor.L = 90
labColor.A = 0.5
labColor.B = 20
Dim pen As PdfPen = New PdfPen(labColor)
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
page.Graphics.DrawRectangle(pen, rect)
doc.Save("LabColor.pdf")
See Also
WhitePoint
Gets or sets the white point
Declaration
public double[] WhitePoint { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] | An array of three numbers [XW YW ZW] specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. |
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();
// Create lab color space
PdfLabColorSpace calGrayCS = new PdfLabColorSpace();
calGrayCS.Range = new double[] { 0.2, 1, 0.8, 23.5 };
calGrayCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
// Create lab color
PdfLabColor labColor = new PdfLabColor(calGrayCS);
labColor.L = 90;
labColor.A = 0.5;
labColor.B = 20;
PdfPen pen = new PdfPen(labColor);
RectangleF rect = new RectangleF(20, 70, 200, 100);
page.Graphics.DrawRectangle(pen, rect);
doc.Save("LabColor.pdf");
' Create a new document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Creates lab color space
Dim calGrayCS As PdfLabColorSpace = New PdfLabColorSpace()
calGrayCS.Range = New Double() { 0.2, 1, 0.8, 23.5 }
calGrayCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
' Create lab color
Dim labColor As PdfLabColor = New PdfLabColor(calGrayCS)
labColor.L = 90
labColor.A = 0.5
labColor.B = 20
Dim pen As PdfPen = New PdfPen(labColor)
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
page.Graphics.DrawRectangle(pen, rect)
doc.Save("LabColor.pdf")