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

Class: Axlsx::PatternFill + + + +

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

Overview

+
+ +
+ Note: +

+The recommended way to manage styles is with Styles#add_style +

+
+
+ +

+A PatternFill is the pattern and solid fill styling for a cell. +

+ + +
+
+
+ + +

See Also:

+
    + +
  • Style#add_style
  • + +
+ +
+ +

Instance Attribute Summary (collapse)

+ + + + + + +

+ Instance Method Summary + (collapse) +

+ + + + +
+

Constructor Details

+ +
+

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

+
+

+Creates a new PatternFill Object +

+ + +
+
+
+

Parameters:

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

    +a customizable set of options +

    +
    + +
  • + +
+ + + + +

Options Hash (options):

+
    + +
  • + patternType + (Symbol) + + + + +
  • + +
  • + fgColor + (Color) + + + + +
  • + +
  • + bgColor + (Color) + + + + +
  • + +
+ + + +
+ + + + +
+
+
+
+44
+45
+46
+47
+48
+49
+
+
# File 'lib/axlsx/stylesheet/pattern_fill.rb', line 44
+
+def initialize(options={})
+  @patternType = :none
+  options.each do |o|
+    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
+  end
+end
+
+
+
+ +
+ +
+

Instance Attribute Details

+ + + + +
+

+ + - (Color) bgColor + + + +

+
+

+The color to use for the background of the fill when the type is not solid. +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Color) + + + +
  • + +
+ +
+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/axlsx/stylesheet/pattern_fill.rb', line 13
+
+def bgColor
+  @bgColor
+end
+
+
+
+ + + + +
+

+ + - (Color) fgColor + + + +

+
+

+The color to use for the the background in solid fills. +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Color) + + + +
  • + +
+ +
+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/axlsx/stylesheet/pattern_fill.rb', line 9
+
+def fgColor
+  @fgColor
+end
+
+
+
+ + + + +
+

+ + - (Object) patternType + + + +

+
+ +
+ Note: +

+patternType must be one of +

+
+ :none
+ :solid
+ :mediumGray
+ :darkGray
+ :lightGray
+ :darkHorizontal
+ :darkVertical
+ :darkDown
+ :darkUp
+ :darkGrid
+ :darkTrellis
+ :lightHorizontal
+ :lightVertical
+ :lightDown
+ :lightUp
+ :lightGrid
+ :lightTrellis
+ :gray125
+ :gray0625
+
+
+
+ +

+The pattern type to use +

+ + +
+
+
+ + +

See Also:

+
    + +
  • Open XML Part 1 18.18.55
  • + +
+ +
+ + + + +
+
+
+
+38
+39
+40
+
+
# File 'lib/axlsx/stylesheet/pattern_fill.rb', line 38
+
+def patternType
+  @patternType
+end
+
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

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

+
+

+Serializes the pattern fill +

+ + +
+
+
+

Parameters:

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

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

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+58
+59
+60
+61
+62
+
+
# File 'lib/axlsx/stylesheet/pattern_fill.rb', line 58
+
+def to_xml(xml) 
+  xml.patternFill(:patternType => self.patternType) { 
+    self.instance_values.reject { |k,v| k.to_sym == :patternType }.each { |k,v| xml.send(k, v.instance_values) }    
+  }
+end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3