Table of Contents

Class PatternColor

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

A pattern color.

Base class for TilingPatternColor and ShadingPatternColor.

public abstract class PatternColor : IColor
Inheritance
PatternColor
Implements
Derived
Inherited Members

Constructors

PatternColor(PatternType, DictionaryToken, DictionaryToken, TransformationMatrix)

protected PatternColor(PatternType patternType, DictionaryToken patternDictionary, DictionaryToken extGState, TransformationMatrix matrix)

Parameters

patternType PatternType
patternDictionary DictionaryToken
extGState DictionaryToken
matrix TransformationMatrix

Properties

ColorSpace

public ColorSpace ColorSpace { get; }

Property Value

ColorSpace

ExtGState

Graphics state parameter dictionary containing graphics state parameters to be put into effect temporarily while the shading pattern is painted. Any parameters that are so specified shall be inherited from the graphics state that was in effect at the beginning of the content stream in which the pattern is defined as a resource.

public DictionaryToken ExtGState { get; }

Property Value

DictionaryToken

Matrix

The pattern matrix (see 8.7.2, "General Properties of Patterns"). Default value: the identity matrix [1 0 0 1 0 0].

public TransformationMatrix Matrix { get; }

Property Value

TransformationMatrix

PatternDictionary

The dictionary defining the pattern.

public DictionaryToken PatternDictionary { get; }

Property Value

DictionaryToken

PatternType

1 for tiling, 2 for shading.

public PatternType PatternType { get; }

Property Value

PatternType

Methods

ToRGBValues()

The color as RGB values (between 0 and 1).

Cannot be called for PatternColor, will throw a InvalidOperationException.

public (double r, double g, double b) ToRGBValues()

Returns

(double r, double g, double b)

ToString()

public override string ToString()

Returns

string