PdfColorSpace Class
Represents a color system of a PDF content.
public abstract class PdfColorSpace : PdfContentResource
Public MustInherit Class PdfColorSpace
Inherits PdfContentResource
- Inheritance:
- System.ObjectPdfColorSpace
Properties
ColorantCount
Gets the number of color components in the color space.
public abstract int ColorantCount { get; }
Public MustOverride ReadOnly Property ColorantCount As Integer
Property Value
- System.Int32
The number of color components in the color space.
DeviceCMYK
Gets the single instance of the DeviceCMYK color space.
public static PdfColorSpace DeviceCMYK { get; }
Public Shared ReadOnly Property DeviceCMYK As PdfColorSpace
Property Value
The single instance of the DeviceCMYK color space.
See Also
DeviceGray
Gets the single instance of the DeviceGray color space.
public static PdfColorSpace DeviceGray { get; }
Public Shared ReadOnly Property DeviceGray As PdfColorSpace
Property Value
The single instance of the DeviceGray color space.
See Also
DeviceRGB
Gets the single instance of the DeviceRGB color space.
public static PdfColorSpace DeviceRGB { get; }
Public Shared ReadOnly Property DeviceRGB As PdfColorSpace
Property Value
The single instance of the DeviceRGB color space.
See Also
Family
Gets the type of the color space.
public abstract PdfColorSpaceFamily Family { get; }
Public MustOverride ReadOnly Property Family As PdfColorSpaceFamily
Property Value
The type of the color space.
Pattern
Gets the single instance of the Pattern color space used with colored tiling patterns.
public static PdfColorSpace Pattern { get; }
Public Shared ReadOnly Property Pattern As PdfColorSpace
Property Value
The single instance of the Pattern color space used with colored tiling patterns.
See Also
Methods
Equals(Object)
Determines whether the specified System.Object is equal to this PdfColorSpace instance.
public sealed override bool Equals(object obj)
Public NotOverridable Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this color space instance.
Returns
- System.Boolean
true if the specified System.Object is equal to this PdfColorSpace instance; otherwise, false.
Overrides
FromArray(PdfArray)
Gets or creates a PdfColorSpace from the specified PdfArray whose first element is a PdfName object identifying the color space family. The remaining PdfArray elements, if any, are parameters that further characterize the color space; their number and types vary according to the particular PdfColorSpaceFamily.
public static PdfColorSpace FromArray(PdfArray array)
Public Shared Function FromArray(array As PdfArray) As PdfColorSpace
Parameters
array
- PdfArray
A PdfArray whose first element is a PdfName object identifying the color space family. The remaining PdfArray elements, if any, are parameters that further characterize the color space; their number and types vary according to the particular PdfColorSpaceFamily.
Returns
An instance of a PdfColorSpace or null.
Remarks
If PdfColorSpace was already created from the same array
, that PdfColorSpace instance is returned.
This method provides a way to create PdfColorSpaces that are currently not available in GemBox.Pdf (such as CalGray, CalRGB, Lab, ICCBased, Indexed, Separation, and DeviceN).
PdfColorSpaces available in GemBox.Pdf are accessible via DeviceGray, DeviceRGB, DeviceCMYK, and Pattern properties.
Exceptions
- System.ArgumentNullException
array
is null.
GetHashCode()
Returns a hash code for this PdfColorSpace instance.
public sealed override int GetHashCode()
Public NotOverridable Overrides Function GetHashCode As Integer
Returns
- System.Int32
An integer value that specifies a hash value for this PdfColorSpace instance.
Overrides
ToString()
Returns a System.String that represents this PdfColorSpace instance.
Returns
- System.String
A System.String that represents this PdfColorSpace instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).
Inherited Properties
Document | Gets the PdfDocument associated with this PdfContentResource or null if no PdfDocument is associated with this PdfContentResource. (Inherited from PdfContentResource) |
Metadata | (Optional; PDF 1.4) A metadata stream containing metadata for the component. (Inherited from PdfObject) |