Class: HexaPDF::Content::ColorSpace::DeviceGray

Inherits:
Object
  • Object
show all
Defined in:
lib/hexapdf/content/color_space.rb

Overview

The DeviceGray color space.

Defined Under Namespace

Classes: Color

Constant Summary collapse

DEFAULT =

The one (and only) DeviceGray color space.

new

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.newObject

Returns the DeviceGray color space object.



309
310
311
# File 'lib/hexapdf/content/color_space.rb', line 309

def self.new
  DEFAULT
end

Instance Method Details

#color(gray) ⇒ Object

Returns the color object for the given gray component.



319
320
321
# File 'lib/hexapdf/content/color_space.rb', line 319

def color(gray)
  Color.new(gray)
end

#default_colorObject

Returns the default color for the DeviceGray color space.



314
315
316
# File 'lib/hexapdf/content/color_space.rb', line 314

def default_color
  Color.new(0.0)
end

#familyObject

Returns :DeviceGray.



324
325
326
# File 'lib/hexapdf/content/color_space.rb', line 324

def family
  :DeviceGray
end