From 8cf0296bbc16e8eb535e9af932eed2557d5e66d2 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Thu, 1 Dec 2011 14:11:42 +0900 Subject: removing generated yard docs from repository --- doc/Axlsx/Drawing.html | 1230 ------------------------------------------------ 1 file changed, 1230 deletions(-) delete mode 100644 doc/Axlsx/Drawing.html (limited to 'doc/Axlsx/Drawing.html') diff --git a/doc/Axlsx/Drawing.html b/doc/Axlsx/Drawing.html deleted file mode 100644 index b6e3ee72..00000000 --- a/doc/Axlsx/Drawing.html +++ /dev/null @@ -1,1230 +0,0 @@ - - - - - - Class: Axlsx::Drawing - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Drawing - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/drawing.rb
- -
-
- -

Overview

-
- -
- Note: -
-

The recommended way to manage drawings is to use the Worksheet.add_chart -method.

-
-
- - -

A Drawing is a canvas for charts. Each worksheet has a single drawing that -manages anchors. The anchors reference the charts via graphical frames. -This is not a trivial relationship so please do follow the advice in the -note. see README for an example of how to create a chart.

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Drawing) initialize(worksheet) - - - -

-
- -

Creates a new Drawing object

- - -
-
-
-

Parameters:

-
    - -
  • - - worksheet - - - (Worksheet) - - - - — -
    -

    The worksheet that owns this drawing

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 52
-
-def initialize(worksheet)
-  DataTypeValidator.validate "Drawing.worksheet", Worksheet, worksheet
-  @worksheet = worksheet
-  @worksheet.workbook.drawings << self
-  @anchors = SimpleTypedList.new [TwoCellAnchor, OneCellAnchor]
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (SimpleTypedList) anchors (readonly) - - - -

-
- -

A collection of anchors for this drawing only TwoCellAnchors are supported -in this version

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 48
-
-def anchors
-  @anchors
-end
-
-
-
- - - - -
-

- - - (Worksheet) worksheet (readonly) - - - -

-
- -

The worksheet that owns the drawing

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 43
-
-def worksheet
-  @worksheet
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) add_chart(chart_type, options = {}) - - - -

-
- -
- Note: -
-

The recommended way to manage charts is to use Worksheet.add_chart. Please -refer to that method for documentation.

-
-
- - -

Adds a chart to the drawing.

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-70
-71
-72
-73
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 70
-
-def add_chart(chart_type, options={})
-  TwoCellAnchor.new(self, options)
-  @anchors.last.add_chart(chart_type, options)
-end
-
-
-
- -
-

- - - (Object) add_image(options = {}) - - - -

-
- -
- Note: -
-

The recommended way to manage images is to use Worksheet.add_image. Please -refer to that method for documentation.

-
-
- - -

Adds an image to the chart

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-62
-63
-64
-65
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 62
-
-def add_image(options={})
-  OneCellAnchor.new(self, options)
-  @anchors.last.object
-end
-
-
-
- -
-

- - - (Array) charts - - - -

-
- -

An array of charts that are associated with this drawing’s anchors

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-80
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 77
-
-def charts
-  charts = @anchors.select { |a| a.object.is_a?(GraphicFrame) }
-  charts.map { |a| a.object.chart }
-end
-
-
-
- -
-

- - - (Array) images - - - -

-
- -

An array of image objects that are associated with this drawing’s anchors

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-85
-86
-87
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 84
-
-def images
-  images = @anchors.select { |a| a.object.is_a?(Pic) }
-  images.map { |a| a.object }
-end
-
-
-
- -
-

- - - (Integer) index - - - -

-
- -

The index of this drawing in the owning workbooks’s drawings collection.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-91
-92
-93
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 91
-
-def index
-  @worksheet.workbook.drawings.index(self)
-end
-
-
-
- -
-

- - - (String) pn - - - -

-
- -

The part name for this drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-103
-104
-105
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 103
-
-def pn
-  "#{DRAWING_PN % (index+1)}"
-end
-
-
-
- -
-

- - - (Relationships) relationships - - - -

-
- -

The drawing’s relationships.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 115
-
-def relationships
-  r = Relationships.new
-  charts.each do |chart|
-    r << Relationship.new(CHART_R, "../#{chart.pn}")
-  end
-  images.each do |image|
-    r << Relationship.new(IMAGE_R, "../#{image.pn}")
-  end
-  r
-end
-
-
-
- -
-

- - - (String) rels_pn - - - -

-
- -

The relational part name for this drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-109
-110
-111
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 109
-
-def rels_pn
-  "#{DRAWING_RELS_PN % (index+1)}"
-end
-
-
-
- -
-

- - - (String) rId - - - -

-
- -

The relation reference id for this drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-97
-98
-99
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 97
-
-def rId
-  "rId#{index+1}"
-end
-
-
-
- -
-

- - - (String) to_xml - - - -

-
- -

Serializes the drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-128
-129
-130
-131
-132
-133
-134
-135
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 128
-
-def to_xml
-  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
-    xml.send('xdr:wsDr', :'xmlns:xdr'=>XML_NS_XDR, :'xmlns:a'=>XML_NS_A) {
-      anchors.each {|anchor| anchor.to_xml(xml) }
-    }        
-  end
-  builder.to_xml
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file -- cgit v1.2.3