Skip to content

Commit

Permalink
Merge pull request #16 from lightswitch05/master
Browse files Browse the repository at this point in the history
Added gradient background ability
  • Loading branch information
pullmonkey committed Jul 24, 2011
2 parents ffbf481 + 21abff1 commit 8f0b61a
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
Binary file modified assets/open-flash-chart.swf
Binary file not shown.
1 change: 1 addition & 0 deletions lib/open_flash_chart.rb
Expand Up @@ -48,6 +48,7 @@
require 'open_flash_chart/menu' require 'open_flash_chart/menu'
require 'open_flash_chart/sugar' require 'open_flash_chart/sugar'
require 'open_flash_chart/tags' require 'open_flash_chart/tags'
require 'open_flash_chart/background'


require 'open_flash_chart/ofc_ajax' require 'open_flash_chart/ofc_ajax'
require 'open_flash_chart/open_flash_chart_object' require 'open_flash_chart/open_flash_chart_object'
45 changes: 45 additions & 0 deletions lib/open_flash_chart/background.rb
@@ -0,0 +1,45 @@
module OpenFlashChart

class Inner_bg_grad
def initialize()
@fillType = 'linear'
@colour1 = '#f8f8d8'
@colour2 = '#FFFFFF'
@alpha = [1,1]
@ratio = [0,255]
@angle = '90'
end

def set_fillType(type)
@fillType = type
end

def set_colour1(color)
@colour1 = color
end

def set_colour2(color)
@colour2 = color
end

def set_alpha(array)
@alpha = array.to_a
end

def set_ratio(array)
@ratio = array.to_a
end

def set_angle(angle)
@angle = angle.to_s
end

alias_method :fillType=, :set_fillType
alias_method :colour1=, :set_colour1
alias_method :colour2=, :set_colour2
alias_method :alpha=, :set_alpha
alias_method :ratio=, :set_ratio
alias_method :angle=, :set_angle
end

end

0 comments on commit 8f0b61a

Please sign in to comment.