Class PdfCalRGBColorSpace
Representing a CalRGB colorspace.
Implements
Namespace: Syncfusion.Pdf.ColorSpace
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public class PdfCalRGBColorSpace : PdfColorSpaces, IPdfCache, IPdfWrapper
Examples
// Create a new PDF document
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
RectangleF rect = new RectangleF(20, 70, 200, 100);
// Creates RedColorSpace
PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
red.Red = 0;
red.Green = 1;
red.Blue = 0;
PdfPen pen = new PdfPen(red);
PdfBrush brush = new PdfSolidBrush(red);
// Draw the rectangle
page.Graphics.DrawRectangle(pen, rect);
doc.Save("CalRedColorSpace.pdf");
' Create a new PDF document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Gets the graphics object.
Dim g As PdfGraphics = page.Graphics
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
' Creates RedColorSpace
Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
red.Red = 0
red.Green = 1
red.Blue = 0
Dim pen As PdfPen = New PdfPen(red)
Dim brush As PdfBrush = New PdfSolidBrush(red)
' Draw the rectangle
page.Graphics.DrawRectangle(pen, rect)
doc.Save("CalRedColorSpace.pdf")
Constructors
PdfCalRGBColorSpace()
Initializes a new instance of the PdfCalRGBColorSpace class.
Declaration
public PdfCalRGBColorSpace()
Examples
// Create a new PDF document
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
RectangleF rect = new RectangleF(20, 70, 200, 100);
// Creates RedColorSpace
PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
red.Red = 0;
red.Green = 1;
red.Blue = 0;
PdfPen pen = new PdfPen(red);
PdfBrush brush = new PdfSolidBrush(red);
// Draw the rectangle
page.Graphics.DrawRectangle(pen, rect);
doc.Save("CalRedColorSpace.pdf");
' Create a new PDF document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Gets the graphics object.
Dim g As PdfGraphics = page.Graphics
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
' Creates RedColorSpace
Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
red.Red = 0
red.Green = 1
red.Blue = 0
Dim pen As PdfPen = New PdfPen(red)
Dim brush As PdfBrush = New PdfSolidBrush(red)
' Draw the rectangle
page.Graphics.DrawRectangle(pen, rect)
doc.Save("CalRedColorSpace.pdf")
See Also
Properties
BlackPoint
Gets or sets the black point.
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
// Create a new PDF document
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
RectangleF rect = new RectangleF(20, 70, 200, 100);
// Creates redColorSpace
PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
calRgbCS.BlackPoint = new double[] { 0.5, 1, 0.8 };
PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
red.Red = 0;
red.Green = 1;
red.Blue = 0;
PdfPen pen = new PdfPen(red);
PdfBrush brush = new PdfSolidBrush(red);
// Draw the rectangle
page.Graphics.DrawRectangle(pen, rect);
doc.Save("CalRedColorSpace.pdf");
' Create a new PDF document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Gets the graphics object.
Dim g As PdfGraphics = page.Graphics
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
' Creates redColorSpace
Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
calRgbCS.BlackPoint = New Double() { 0.5, 1, 0.8 }
Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
red.Red = 0
red.Green = 1
red.Blue = 0
Dim pen As PdfPen = New PdfPen(red)
Dim brush As PdfBrush = New PdfSolidBrush(red)
' Draw the rectangle
page.Graphics.DrawRectangle(pen, rect)
doc.Save("CalRedColorSpace.pdf")
See Also
Gamma
Gets or sets the gamma.
Declaration
public double[] Gamma { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] | An array of three numbers [GR GG GB] specifying the gamma for the red, green, and blue components of the color space. |
Examples
// Create a new PDF document
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
RectangleF rect = new RectangleF(20, 70, 200, 100);
// Creates redColorSpace
PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
calRgbCS.Gamma = new double[] { 1.6, 1.1, 2.5 };
PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
red.Red = 0;
red.Green = 1;
red.Blue = 0;
PdfPen pen = new PdfPen(red);
PdfBrush brush = new PdfSolidBrush(red);
// Draw the rectangle
page.Graphics.DrawRectangle(pen, rect);
doc.Save("CalRedColorSpace.pdf");
' Create a new PDF document
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
' Gets the graphics object.
Dim g As PdfGraphics = page.Graphics
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
' Creates redColorSpace
Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
calRgbCS.Gamma = New Double() { 1.6, 1.1, 2.5 }
Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
red.Red = 0
red.Green = 1
red.Blue = 0
Dim pen As PdfPen = New PdfPen(red)
Dim brush As PdfBrush = New PdfSolidBrush(red)
' Draw the rectangle
page.Graphics.DrawRectangle(pen, rect)
doc.Save("CalRedColorSpace.pdf")
See Also
Matrix
Gets or sets the colorspace transformation matrix.
Declaration
public double[] Matrix { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] | An array of nine numbers [XA YA ZA XB YB ZB XC YC ZC] specifying the linear interpretation of the decoded A, B, and C components of the color space with respect to the final XYZ representation. |
Examples
// Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
RectangleF rect = new RectangleF(20, 70, 200, 100);
// Creates redColorSpace
PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
calRgbCS.Matrix = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
red.Red = 0;
PdfPen pen = new PdfPen(red);
PdfBrush brush = new PdfSolidBrush(red);
// Draws the rectangle
page.Graphics.DrawRectangle(pen, rect);
doc.Save("CalRedColorSpace.pdf");
' Create a new PDF document.
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
' Creates redColorSpace
Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
calRgbCS.Matrix = New Double() { 1, 0, 0, 0, 1, 0, 0, 0, 1 }
Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
red.Red = 0
Dim pen As PdfPen = New PdfPen(red)
Dim brush As PdfBrush = New PdfSolidBrush(red)
' Draws the rectangle
page.Graphics.DrawRectangle(pen, rect)
doc.Save("CalRedColorSpace.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
// Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
RectangleF rect = new RectangleF(20, 70, 200, 100);
// Creates redColorSpace
PdfCalRGBColorSpace calRgbCS = new PdfCalRGBColorSpace();
calRgbCS.WhitePoint = new double[] { 0.2, 1, 0.8 };
PdfCalRGBColor red = new PdfCalRGBColor(calRgbCS);
red.Red = 0;
PdfPen pen = new PdfPen(red);
PdfBrush brush = new PdfSolidBrush(red);
// Draws the rectangle
page.Graphics.DrawRectangle(pen, rect);
doc.Save("CalRedColorSpace.pdf");
' Create a new PDF document.
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
Dim rect As RectangleF = New RectangleF(20, 70, 200, 100)
' Creates redColorSpace
Dim calRgbCS As PdfCalRGBColorSpace = New PdfCalRGBColorSpace()
calRgbCS.WhitePoint = New Double() { 0.2, 1, 0.8 }
Dim red As PdfCalRGBColor = New PdfCalRGBColor(calRgbCS)
red.Red = 0
Dim pen As PdfPen = New PdfPen(red)
Dim brush As PdfBrush = New PdfSolidBrush(red)
' Draws the rectangle
page.Graphics.DrawRectangle(pen, rect)
doc.Save("CalRedColorSpace.pdf")