Class: Pdfrb::Model::Type::DeviceN
Overview
DeviceN color space (s8.6.6.4). Multiple custom colorants mapped
through a single tint-transform function. Generalises Separation.
Instance Attribute Summary
Attributes inherited from Object
#document, #gen, #oid, #value
Instance Method Summary
collapse
#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate
Methods inherited from Object
#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type
Instance Method Details
#alternate_space ⇒ Object
10
|
# File 'lib/pdfrb/model/type/device_n.rb', line 10
def alternate_space; self[:AlternateSpace]; end
|
#attributes ⇒ Object
12
|
# File 'lib/pdfrb/model/type/device_n.rb', line 12
def attributes; self[:Attributes]; end
|
#colorant_count ⇒ Object
14
15
16
17
18
19
|
# File 'lib/pdfrb/model/type/device_n.rb', line 14
def colorant_count
return 0 unless colorants
arr = colorants.is_a?(Pdfrb::Model::PdfArray) ? colorants.to_a : colorants
arr.is_a?(Array) ? arr.size : 0
end
|
#colorants ⇒ Object
9
|
# File 'lib/pdfrb/model/type/device_n.rb', line 9
def colorants; self[:Names]; end
|
#components ⇒ Object
21
22
23
|
# File 'lib/pdfrb/model/type/device_n.rb', line 21
def components
colorant_count
end
|
#each_colorant ⇒ Object
25
26
27
28
29
30
31
32
33
|
# File 'lib/pdfrb/model/type/device_n.rb', line 25
def each_colorant(&)
return enum_for(:each_colorant) unless block_given?
return unless colorants
arr = colorants.is_a?(Pdfrb::Model::PdfArray) ? colorants.to_a : colorants
return unless arr.is_a?(Array)
arr.each(&)
end
|
11
|
# File 'lib/pdfrb/model/type/device_n.rb', line 11
def tint_transform; self[:TintTransform]; end
|