Module: Idml::Render::GradientResolver
- Defined in:
- lib/idml/render/gradient_resolver.rb
Overview
Identifies IDML gradient color references and exposes the
gradient catalogue from Resources/Graphic.xml.
The discrete-rectangle approximation that this module used to
carry was removed once pdfrb 0.4.0 introduced real PDF shadings
(TODOs 49, 66, 68). Today the renderers go through pdfrb's
Shadings#add_axial / add_radial directly; this module's
only remaining responsibility is the predicate that distinguishes
gradient colour references from solid ones.
Class Method Summary collapse
Class Method Details
.gradient?(name) ⇒ Boolean
15 16 17 |
# File 'lib/idml/render/gradient_resolver.rb', line 15 def self.gradient?(name) name.is_a?(String) && name.start_with?("Gradient/") end |