Class: Lutaml::Xsd::Spa::Svg::Config::Effects

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/xsd/spa/svg/config/effects.rb

Overview

Value object for visual effects configuration

Instance Method Summary collapse

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_directionObject



40
41
42
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 40

def gradient_direction
  @gradient.direction
end

#gradient_enabled?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 36

def gradient_enabled?
  @gradient.enabled?
end

#shadow_blurObject



20
21
22
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 20

def shadow_blur
  @shadow.blur
end

#shadow_enabled?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 16

def shadow_enabled?
  @shadow.enabled?
end

#shadow_offset_xObject



24
25
26
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 24

def shadow_offset_x
  @shadow.offset_x
end

#shadow_offset_yObject



28
29
30
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 28

def shadow_offset_y
  @shadow.offset_y
end

#shadow_opacityObject



32
33
34
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 32

def shadow_opacity
  @shadow.opacity
end