Module: Lotu::TransformationSystem::UserMethods

Defined in:
lib/lotu/systems/transformation_system.rb

Instance Method Summary collapse

Instance Method Details

#transform(object, property, opts) ⇒ Object



74
75
76
# File 'lib/lotu/systems/transformation_system.rb', line 74

def transform(object, property, opts)
  @systems[TransformationSystem].transform(object, property, opts)
end

#transform_alpha(opts) ⇒ Object

Color helpers



92
93
94
# File 'lib/lotu/systems/transformation_system.rb', line 92

def transform_alpha(opts)
  transform(@color, :alpha, opts.merge!(:on_result => :to_i))
end

#transform_angle(opts) ⇒ Object

Image helpers



79
80
81
# File 'lib/lotu/systems/transformation_system.rb', line 79

def transform_angle(opts)
  transform(self, :angle, opts)
end

#transform_blue(opts) ⇒ Object



104
105
106
# File 'lib/lotu/systems/transformation_system.rb', line 104

def transform_blue(opts)
  transform(@color, :blue, opts.merge!(:on_result => :to_i))
end

#transform_green(opts) ⇒ Object



100
101
102
# File 'lib/lotu/systems/transformation_system.rb', line 100

def transform_green(opts)
  transform(@color, :green, opts.merge!(:on_result => :to_i))
end

#transform_height(opts) ⇒ Object



87
88
89
# File 'lib/lotu/systems/transformation_system.rb', line 87

def transform_height(opts)
  transform(self, :height, opts)
end

#transform_hue(opts) ⇒ Object



108
109
110
# File 'lib/lotu/systems/transformation_system.rb', line 108

def transform_hue(opts)
  transform(@color, :hue, opts)
end

#transform_red(opts) ⇒ Object



96
97
98
# File 'lib/lotu/systems/transformation_system.rb', line 96

def transform_red(opts)
  transform(@color, :red, opts.merge!(:on_result => :to_i))
end

#transform_saturation(opts) ⇒ Object



112
113
114
# File 'lib/lotu/systems/transformation_system.rb', line 112

def transform_saturation(opts)
  transform(@color, :saturation, opts)
end

#transform_value(opts) ⇒ Object



116
117
118
# File 'lib/lotu/systems/transformation_system.rb', line 116

def transform_value(opts)
  transform(@color, :value, opts)
end

#transform_width(opts) ⇒ Object



83
84
85
# File 'lib/lotu/systems/transformation_system.rb', line 83

def transform_width(opts)
  transform(self, :width, opts)
end