Class: Pdfrb::Color::ICCBased

Inherits:
CIEBasedColorSpace show all
Defined in:
lib/pdfrb/color/color_space.rb

Overview

ICCBased is special — references an ICC profile stream. Delegates to Pdfrb::Color::ICCProfile for stream creation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CIEBasedColorSpace

#parameters_array

Methods inherited from ColorSpace

[], names, register, register_as, registry

Constructor Details

#initialize(icc_stream_ref) ⇒ ICCBased

Returns a new instance of ICCBased.



160
161
162
# File 'lib/pdfrb/color/color_space.rb', line 160

def initialize(icc_stream_ref)
  @icc_stream_ref = icc_stream_ref
end

Instance Attribute Details

#icc_stream_refObject (readonly)

Returns the value of attribute icc_stream_ref.



158
159
160
# File 'lib/pdfrb/color/color_space.rb', line 158

def icc_stream_ref
  @icc_stream_ref
end

Class Method Details

.pdf_nameObject



165
# File 'lib/pdfrb/color/color_space.rb', line 165

def pdf_name; :ICCBased; end

Instance Method Details

#to_pdfObject



168
169
170
# File 'lib/pdfrb/color/color_space.rb', line 168

def to_pdf
  Pdfrb::Model::PdfArray.new([:ICCBased, @icc_stream_ref])
end