Click or drag to resize

ColorSpace Class

This abstract class is used to serve as a color space tag to identify the specific color space of a Color object. It contains methods that transform colors in a specific color space to/from several color space such as DeviceRGB and DeviceCMYK. For purposes of the methods in this class, colors are represented as Arrays of color components represented as doubles in a normalized range defined by each ColorSpace. For many ColorSpaces (e.g. DeviceRGB), this range is 0.0 to 1.0. However, some ColorSpaces have components whose values have a different range. Methods are provided to inquire per component minimum and maximum normalized values.
Inheritance Hierarchy
SystemObject
  pdftron.PDFColorSpace

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public sealed class ColorSpace : IClosable

The ColorSpace type exposes the following members.

Constructors
  NameDescription
Public methodColorSpace
Create a ColorSpace from the given SDF/Cos object listed under ColorSpaces entry in page Resource dictionary. If color_space dictionary is null, a non valid ColorSpace object is created.
Top
Methods
  NameDescription
Public methodClose
Public methodConvert2CMYK
A convenience function used to convert color points from the current color space to DeviceCMYK color space.
Public methodConvert2Gray
Initialize default ranges for each color component in the color space. For example, default ranges for DeviceRGB are [0 1 0 1 0 1] but for Lab the default values might be [0 100 -100 100 -100 100].
Public methodConvert2RGB
A convenience function used to convert color points from the current color space to DeviceRGB color space.
Public methodStatic memberCreate
Create a new ColorSpace from a given object
Public methodStatic memberCreateDeviceCMYK
Create a new DeviceCMYK ColorSpace object.
Public methodStatic memberCreateDeviceGray
Create a new DeviceGray ColorSpace object.
Public methodStatic memberCreateDeviceRGB
Create a new DeviceRGB ColorSpace object.
Public methodStatic memberCreateICCFromBuffer
Creates the icc from buffer.
Public methodStatic memberCreateICCFromFile
Create a PDF 'ICCBased' color space given an ICC profile.
Public methodStatic memberCreateICCFromFilter
Creates the icc from filter.
Public methodStatic memberCreatePattern
Create a new Pattern ColorSpace object.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetAlternateColorSpace
Gets the alternate color space.
Public methodGetBaseColorSpace
Gets the base color space.
Public methodGetComponentNum
Gets the component num.
Public methodStatic memberGetComponentNum(ColorSpaceType, Obj)
Gets the number of colorants (tint components) used to represent color point in this color space
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetHighVal
Gets the highest index for the color lookup table for Indexed color space.
Public methodGetSDFObj
Gets the sDF obj.
Public methodGetTintFunction
Gets the tint function.
Public methodGetType
Gets the type.
Public methodStatic memberGetType(Obj)
Gets the type.
Public methodInitColor
Set color to the initial value used for this color space. The initial value depends on the color space (see 4.5.7 in PDF Ref. Manual).
Public methodIsAll
Checks if is all.
Public methodIsNone
Checks if is none.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
Note that in Pattern color space (i.e. for ColorSpace::e_pattern) 'color values' are PDF::PatternColor objects instead of the numeric component values (i.e. ColorPt) used with other spaces.
See Also