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/Color.html | 665 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 665 insertions(+) create mode 100644 doc/Axlsx/Color.html (limited to 'doc/Axlsx/Color.html') diff --git a/doc/Axlsx/Color.html b/doc/Axlsx/Color.html new file mode 100644 index 00000000..f73dc256 --- /dev/null +++ b/doc/Axlsx/Color.html @@ -0,0 +1,665 @@ + + + + + + Class: Axlsx::Color + + — Documentation by YARD 0.7.3 + + + + + + + + + + + + + + + + + + + + + + +

Class: Axlsx::Color + + + +

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

Overview

+
+

+The color class represents a color used for borders, fills an fonts +

+ + +
+
+
+ + +
+ +

Instance Attribute Summary (collapse)

+ + + + + + +

+ Instance Method Summary + (collapse) +

+ + + + +
+

Constructor Details

+ +
+

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

+
+

+Creates a new Color object +

+ + +
+
+
+

Parameters:

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

    +a customizable set of options +

    +
    + +
  • + +
+ + + + +

Options Hash (options):

+
    + +
  • + auto + (Boolean) + + + + +
  • + +
  • + rgb + (String) + + + + +
  • + +
  • + tint + (Float) + + + + +
  • + +
+ + + +
+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+
+
# File 'lib/axlsx/stylesheet/color.rb', line 34
+
+def initialize(options={})
+  @rgb = "FF000000"
+  options.each do |o|
+    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
+  end
+end
+
+
+
+ +
+ +
+

Instance Attribute Details

+ + + + +
+

+ + - (Boolean) auto + + + +

+
+

+Determines if the color is system color dependant +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/axlsx/stylesheet/color.rb', line 6
+
+def auto
+  @auto
+end
+
+
+
+ + + + +
+

+ + - (String) rgb + + + +

+
+ +
+ Note: +

+rgb colors need to conform to ST_UnsignedIntHex. That basically means put +‘FF’ before you color +

+
+
+ +

+The color as defined in rgb terms. +

+ + +
+
+
+ +
+

Examples:

+ +

+rgb colors +

+

+
"FF000000" is black
+"FFFFFFFF" is white
+
+ +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/axlsx/stylesheet/color.rb', line 19
+
+def rgb
+  @rgb
+end
+
+
+
+ + + + +
+

+ + - (Float) tint + + + +

+
+ +
+ Note: +

+valid values are between -1.0 and 1.0 +

+
+
+ +

+The tint value. +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Float) + + + +
  • + +
+ +
+ + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/axlsx/stylesheet/color.rb', line 28
+
+def tint
+  @tint
+end
+
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

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

+
+

+Serializes the color +

+ + +
+
+
+

Parameters:

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

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

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+55
+
+
# File 'lib/axlsx/stylesheet/color.rb', line 55
+
+def to_xml(xml) xml.color(self.instance_values) end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3