Table of Contents

Interface IColorSpaceContext

Namespace
UglyToad.PdfPig.Graphics
Assembly
UglyToad.PdfPig.dll

Methods for manipulating and retrieving the current color state for a PDF content stream.

public interface IColorSpaceContext : IDeepCloneable<IColorSpaceContext>
Inherited Members

Properties

CurrentNonStrokingColorSpace

The ColorSpaceDetails used for non-stroking operations.

ColorSpaceDetails CurrentNonStrokingColorSpace { get; }

Property Value

ColorSpaceDetails

CurrentStrokingColorSpace

The ColorSpaceDetails used for stroking operations.

ColorSpaceDetails CurrentStrokingColorSpace { get; }

Property Value

ColorSpaceDetails

Methods

SetNonStrokingColor(IReadOnlyList<decimal>, NameToken)

Set the color to use for nonstroking operations using the current color space.

void SetNonStrokingColor(IReadOnlyList<decimal> operands, NameToken patternName = null)

Parameters

operands IReadOnlyList<decimal>
patternName NameToken

SetNonStrokingColorCmyk(decimal, decimal, decimal, decimal)

Set the nonstroking color space to DeviceCMYK and set the color to use for nonstroking operations.

void SetNonStrokingColorCmyk(decimal c, decimal m, decimal y, decimal k)

Parameters

c decimal

Cyan - A number between 0 (minimum concentration) and 1 (maximum concentration).

m decimal

Magenta - A number between 0 (minimum concentration) and 1 (maximum concentration).

y decimal

Yellow - A number between 0 (minimum concentration) and 1 (maximum concentration).

k decimal

Black - A number between 0 (minimum concentration) and 1 (maximum concentration).

SetNonStrokingColorGray(decimal)

Set the nonstroking color space to DeviceGray and set the gray level to use for nonstroking operations.

void SetNonStrokingColorGray(decimal gray)

Parameters

gray decimal

A number between 0.0 (black) and 1.0 (white).

SetNonStrokingColorRgb(decimal, decimal, decimal)

Set the nonstroking color space to DeviceRGB and set the color to use for nonstroking operations.

void SetNonStrokingColorRgb(decimal r, decimal g, decimal b)

Parameters

r decimal

Red - A number between 0 (minimum intensity) and 1 (maximum intensity).

g decimal

Green - A number between 0 (minimum intensity) and 1 (maximum intensity).

b decimal

Blue - A number between 0 (minimum intensity) and 1 (maximum intensity).

SetNonStrokingColorspace(NameToken, DictionaryToken)

Set the current color space to use for nonstroking operations and initialize the nonstroking color.

void SetNonStrokingColorspace(NameToken colorspace, DictionaryToken dictionary = null)

Parameters

colorspace NameToken

The color space name.

dictionary DictionaryToken

The color space dictionary. Default value is null.

SetStrokingColor(IReadOnlyList<decimal>, NameToken)

Set the color to use for stroking operations using the current color space.

void SetStrokingColor(IReadOnlyList<decimal> operands, NameToken patternName = null)

Parameters

operands IReadOnlyList<decimal>
patternName NameToken

SetStrokingColorCmyk(decimal, decimal, decimal, decimal)

Set the stroking color space to DeviceCMYK and set the color to use for stroking operations.

void SetStrokingColorCmyk(decimal c, decimal m, decimal y, decimal k)

Parameters

c decimal

Cyan - A number between 0 (minimum concentration) and 1 (maximum concentration).

m decimal

Magenta - A number between 0 (minimum concentration) and 1 (maximum concentration).

y decimal

Yellow - A number between 0 (minimum concentration) and 1 (maximum concentration).

k decimal

Black - A number between 0 (minimum concentration) and 1 (maximum concentration).

SetStrokingColorGray(decimal)

Set the stroking color space to DeviceGray and set the gray level to use for stroking operations.

void SetStrokingColorGray(decimal gray)

Parameters

gray decimal

A number between 0.0 (black) and 1.0 (white).

SetStrokingColorRgb(decimal, decimal, decimal)

Set the stroking color space to DeviceRGB and set the color to use for stroking operations.

void SetStrokingColorRgb(decimal r, decimal g, decimal b)

Parameters

r decimal

Red - A number between 0 (minimum intensity) and 1 (maximum intensity).

g decimal

Green - A number between 0 (minimum intensity) and 1 (maximum intensity).

b decimal

Blue - A number between 0 (minimum intensity) and 1 (maximum intensity).

SetStrokingColorspace(NameToken, DictionaryToken)

Set the current color space to use for stroking operations and initialize the stroking color.

void SetStrokingColorspace(NameToken colorspace, DictionaryToken dictionary = null)

Parameters

colorspace NameToken

The color space name.

dictionary DictionaryToken

The color space dictionary. Default value is null.