Class: Lutaml::Xsd::Spa::Svg::Config::Effects
- Inherits:
-
Object
- Object
- Lutaml::Xsd::Spa::Svg::Config::Effects
- Defined in:
- lib/lutaml/xsd/spa/svg/config/effects.rb
Overview
Value object for visual effects configuration
Instance Method Summary collapse
- #gradient_direction ⇒ Object
- #gradient_enabled? ⇒ Boolean
-
#initialize(effects_hash) ⇒ Effects
constructor
A new instance of Effects.
- #shadow_blur ⇒ Object
- #shadow_enabled? ⇒ Boolean
- #shadow_offset_x ⇒ Object
- #shadow_offset_y ⇒ Object
- #shadow_opacity ⇒ Object
Constructor Details
#initialize(effects_hash) ⇒ Effects
Returns a new instance of Effects.
10 11 12 13 14 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 10 def initialize(effects_hash) @effects = effects_hash @shadow = ShadowEffect.new(@effects["shadow"] || {}) @gradient = GradientEffect.new(@effects["gradient"] || {}) end |
Instance Method Details
#gradient_direction ⇒ Object
40 41 42 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 40 def gradient_direction @gradient.direction end |
#gradient_enabled? ⇒ Boolean
36 37 38 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 36 def gradient_enabled? @gradient.enabled? end |
#shadow_blur ⇒ Object
20 21 22 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 20 def shadow_blur @shadow.blur end |
#shadow_enabled? ⇒ Boolean
16 17 18 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 16 def shadow_enabled? @shadow.enabled? end |
#shadow_offset_x ⇒ Object
24 25 26 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 24 def shadow_offset_x @shadow.offset_x end |
#shadow_offset_y ⇒ Object
28 29 30 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 28 def shadow_offset_y @shadow.offset_y end |
#shadow_opacity ⇒ Object
32 33 34 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 32 def shadow_opacity @shadow.opacity end |