Module: Origami::ResourcesHolder
Instance Method Summary collapse
- #add_colorspace(name, colorspace) ⇒ Object
- #add_extgstate(name, extgstate) ⇒ Object
- #add_font(name, font) ⇒ Object
- #add_pattern(name, pattern) ⇒ Object
- #add_properties(name, properties) ⇒ Object
- #add_shading(name, shading) ⇒ Object
- #add_xobject(name, xobject) ⇒ Object
Instance Method Details
#add_colorspace(name, colorspace) ⇒ Object
105 106 107 108 109 110 111 112 |
# File 'lib/origami/page.rb', line 105 def add_colorspace(name, colorspace) target = self.is_a?(Resources) ? self : (self.Resources ||= Resources.new) csdir = target[:ColorSpace] ||= {} (csdir.is_a?(Reference) ? csdir.solve : csdir)[name] = colorspace self end |
#add_extgstate(name, extgstate) ⇒ Object
96 97 98 99 100 101 102 103 |
# File 'lib/origami/page.rb', line 96 def add_extgstate(name, extgstate) target = self.is_a?(Resources) ? self : (self.Resources ||= Resources.new) target.ExtGState ||= {} target.ExtGState[name] = extgstate self end |
#add_font(name, font) ⇒ Object
141 142 143 144 145 146 147 148 |
# File 'lib/origami/page.rb', line 141 def add_font(name, font) target = self.is_a?(Resources) ? self : (self.Resources ||= Resources.new) target.Font ||= {} target.Font[name] = font self end |
#add_pattern(name, pattern) ⇒ Object
114 115 116 117 118 119 120 121 |
# File 'lib/origami/page.rb', line 114 def add_pattern(name, pattern) target = self.is_a?(Resources) ? self : (self.Resources ||= Resources.new) target.Pattern ||= {} target.Pattern[name] = pattern self end |
#add_properties(name, properties) ⇒ Object
150 151 152 153 154 155 156 157 |
# File 'lib/origami/page.rb', line 150 def add_properties(name, properties) target = self.is_a?(Resources) ? self : (self.Resources ||= Resources.new) target.Properties ||= {} target.Properties[name] = properties self end |