Class: ExtJS::XTheme::Command::Effects

Inherits:
Base
  • Object
show all
Defined in:
lib/extjs-xtheme/commands/effects.rb

Instance Attribute Summary

Attributes inherited from Base

#args, #config

Instance Method Summary collapse

Methods inherited from Base

#ask, #display, #error, #escape, #extract_app, #extract_app_in_dir, #extract_option, #heroku, #initialize, #shell

Constructor Details

This class inherits a constructor from ExtJS::XTheme::Command::Base

Instance Method Details

#modulateObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/extjs-xtheme/commands/effects.rb', line 6

def modulate
  unless @args.length == 4
    display "Usage: xtheme effects:modulate <theme-name> <hue> <saturation> <lightness>"
     display " Specify <hue>, <saturation> and <lightness> as Floats, for example,"
     display " 0.25 means 25%. The default value of each argument is 1.0, that is, 100%"        
     return
  end
  display "Modulating theme images"
  ExtJS::XTheme::Effects.modulate(@config[:ext_dir], "#{@config[:theme_dir]}/#{@args[0]}", @args[1].to_f, @args[2].to_f, @args[3].to_f)
end