Table of Contents

Class PdfCalRGBColorSpace

Namespace
Syncfusion.Pdf.ColorSpace
Assembly
Syncfusion.Pdf.Portable.dll

Representing a CalRGB colorspace.

public class PdfCalRGBColorSpace : PdfColorSpaces
Inheritance
PdfCalRGBColorSpace
Inherited Members

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.

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.

public double[] BlackPoint { get; set; }

Property Value

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.

public double[] Gamma { get; set; }

Property Value

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.

public double[] Matrix { get; set; }

Property Value

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.

public double[] WhitePoint { get; set; }

Property Value

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")
See Also

See Also