Permalink
Browse files

Merge pull request #16 from lightswitch05/master

Added gradient background ability
  • Loading branch information...
2 parents ffbf481 + 21abff1 commit 8f0b61afaa93a1b94331fa0aa09f83e9930a0564 @pullmonkey committed Jul 24, 2011
Showing with 46 additions and 0 deletions.
  1. BIN assets/open-flash-chart.swf
  2. +1 −0 lib/open_flash_chart.rb
  3. +45 −0 lib/open_flash_chart/background.rb
View
BIN assets/open-flash-chart.swf
Binary file not shown.
View
1 lib/open_flash_chart.rb
@@ -48,6 +48,7 @@
require 'open_flash_chart/menu'
require 'open_flash_chart/sugar'
require 'open_flash_chart/tags'
+require 'open_flash_chart/background'
require 'open_flash_chart/ofc_ajax'
require 'open_flash_chart/open_flash_chart_object'
View
45 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.