Class ColorSpace
A PDF color space (spec §8.6). Color spaces define how colors are represented in a PDF content stream. This is the base class for all color space types.
Inheritance
ColorSpace
Implements
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public abstract class ColorSpace : IEquatable<ColorSpace>
Constructors
ColorSpace(ColorSpaceFamily)
Initializes a new color space with the specified family.
Declaration
protected ColorSpace(ColorSpaceFamily family)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorSpaceFamily | family |
Properties
Family
Gets the family of this color space.
Declaration
public ColorSpaceFamily Family { get; }
Property Value
| Type | Description |
|---|---|
| ColorSpaceFamily |
Methods
DeviceCmyk()
Creates a DeviceCMYK color space (spec §8.6.3).
Declaration
public static ColorSpace DeviceCmyk()
Returns
| Type | Description |
|---|---|
| ColorSpace |
DeviceGray()
Creates a DeviceGray color space (spec §8.6.3).
Declaration
public static ColorSpace DeviceGray()
Returns
| Type | Description |
|---|---|
| ColorSpace |
DeviceRgb()
Creates a DeviceRGB color space (spec §8.6.3).
Declaration
public static ColorSpace DeviceRgb()
Returns
| Type | Description |
|---|---|
| ColorSpace |
Equals(ColorSpace?)
Indicates whether this color space equals another.
Declaration
public abstract bool Equals(ColorSpace? other)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorSpace | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Indicates whether this color space equals another object.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
GetHashCode()
Returns a hash code for this color space.
Declaration
public override abstract int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
Pattern()
Creates a Pattern color space (spec §8.7).
Declaration
public static ColorSpace Pattern()
Returns
| Type | Description |
|---|---|
| ColorSpace |