From 2d0ac967e94c5944ccccf9adad8da5a9d082df29 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 20 Nov 2011 23:44:58 +0900 Subject: pushing docs --- doc/Axlsx/GradientFill.html | 1026 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1026 insertions(+) create mode 100644 doc/Axlsx/GradientFill.html (limited to 'doc/Axlsx/GradientFill.html') diff --git a/doc/Axlsx/GradientFill.html b/doc/Axlsx/GradientFill.html new file mode 100644 index 00000000..956af528 --- /dev/null +++ b/doc/Axlsx/GradientFill.html @@ -0,0 +1,1026 @@ + + + + + + Class: Axlsx::GradientFill + + — Documentation by YARD 0.7.3 + + + + + + + + + + + + + + + + + + + + + + +

Class: Axlsx::GradientFill + + + +

+ +
+ +
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+ + + + + + + + + +
Defined in:
+
lib/axlsx/stylesheet/gradient_fill.rb
+ +
+
+ +

Overview

+
+

+A GradientFill defines the color and positioning for gradiant cell fill. +

+ + +
+
+
+ + +

See Also:

+
    + +
  • Office XML Part 1 ยง18.8.24
  • + +
+ +
+ +

Instance Attribute Summary (collapse)

+ + + + + + +

+ Instance Method Summary + (collapse) +

+ + + + +
+

Constructor Details

+ +
+

+ + - (GradientFill) initialize(options = {}) + + + +

+
+

+Creates a new GradientFill object +

+ + +
+
+
+

Parameters:

+
    + +
  • + + options + + + (Hash) + + + (defaults to: {}) + + + — +

    +a customizable set of options +

    +
    + +
  • + +
+ + + + +

Options Hash (options):

+
    + +
  • + type + (Symbol) + + + + +
  • + +
  • + degree + (Float) + + + + +
  • + +
  • + left + (Float) + + + + +
  • + +
  • + right + (Float) + + + + +
  • + +
  • + top + (Float) + + + + +
  • + +
  • + bottom + (Float) + + + + +
  • + +
+ + + +
+ + + + +
+
+
+
+46
+47
+48
+49
+50
+51
+52
+
+
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 46
+
+def initialize(options={})
+  options[:type] ||= :linear
+  options.each do |o|
+    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
+  end
+  @stop = SimpleTypedList.new GradientStop
+end
+
+
+
+ +
+ +
+

Instance Attribute Details

+ + + + +
+

+ + - (Float) bottom + + + +

+
+

+Percentage format bottom +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Float) + + + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+
+
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 33
+
+def bottom
+  @bottom
+end
+
+
+
+ + + + +
+

+ + - (Float) degree + + + +

+
+

+Angle of the linear gradient +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Float) + + + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+
+
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 17
+
+def degree
+  @degree
+end
+
+
+
+ + + + +
+

+ + - (Float) left + + + +

+
+

+Percentage format left +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Float) + + + +
  • + +
+ +
+ + + + +
+
+
+
+21
+22
+23
+
+
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 21
+
+def left
+  @left
+end
+
+
+
+ + + + +
+

+ + - (Float) right + + + +

+
+

+Percentage format right +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Float) + + + +
  • + +
+ +
+ + + + +
+
+
+
+25
+26
+27
+
+
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 25
+
+def right
+  @right
+end
+
+
+
+ + + + +
+

+ + - (SimpleTypedList) stop (readonly) + + + +

+
+

+Collection of stop objects +

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+37
+38
+39
+
+
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 37
+
+def stop
+  @stop
+end
+
+
+
+ + + + +
+

+ + - (Float) top + + + +

+
+

+Percentage format top +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Float) + + + +
  • + +
+ +
+ + + + +
+
+
+
+29
+30
+31
+
+
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 29
+
+def top
+  @top
+end
+
+
+
+ + + + +
+

+ + - (Symbol) type + + + +

+
+ +
+ Note: +

+valid options are +

+
+ :linear
+ :path
+
+
+
+ +

+The type of gradient. +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Symbol) + + + +
  • + +
+ +
+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 13
+
+def type
+  @type
+end
+
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + - (String) to_xml(xml) + + + +

+
+

+Serializes the gradientFill +

+ + +
+
+
+

Parameters:

+
    + +
  • + + xml + + + (Nokogiri::XML::Builder) + + + + — +

    +The document builder instance this objects xml will be added to. +

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+64
+65
+66
+67
+68
+
+
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 64
+
+def to_xml(xml)
+  xml.gradientFill(self.instance_values.reject { |k,v| k.to_sym == :stop }) {
+    @stop.each { |s| s.to_xml(xml) }
+  }
+end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3