class HexaPDF::Content::ColorSpace::Universal

This class represents a “universal” color space that is used for all color spaces that aren't implemented yet.

Attributes

definition[R]

The color space definition used for creating this universal color space.

Public Class Methods

new(definition) click to toggle source

Creates the universal color space for the given color space definition.

# File lib/hexapdf/content/color_space.rb, line 178
def initialize(definition)
  @definition = definition
end

Public Instance Methods

==(other) click to toggle source

Compares this universal color space to another one by looking at their definitions.

# File lib/hexapdf/content/color_space.rb, line 199
def ==(other)
  other.kind_of?(self.class) && definition == other.definition
end
color(*args) click to toggle source

Creates a new universal color object. The number of arguments isn't restricted.

# File lib/hexapdf/content/color_space.rb, line 188
def color(*args)
  Color.new(self, *args)
end
Also aliased as: prenormalized_color
default_color() click to toggle source

The default universal color.

# File lib/hexapdf/content/color_space.rb, line 183
def default_color
  Color.new(self)
end
family() click to toggle source

Returns the PDF color space family this color space belongs to.

# File lib/hexapdf/content/color_space.rb, line 194
def family
  @definition[0]
end
prenormalized_color(*args)
Alias for: color