From 058faf2581970fa18c314ad07f5658adeca32c69 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 22:08:55 +0900 Subject: update to README --- doc/Axlsx/Pic.html | 354 +++++++++++++++++++++++------------------------------ 1 file changed, 152 insertions(+), 202 deletions(-) (limited to 'doc/Axlsx/Pic.html') diff --git a/doc/Axlsx/Pic.html b/doc/Axlsx/Pic.html index e131236c..6e99b241 100644 --- a/doc/Axlsx/Pic.html +++ b/doc/Axlsx/Pic.html @@ -94,10 +94,9 @@

Overview

-

-a Pic object represents an image in your worksheet Worksheet#add_image is -the recommended way to manage images in your sheets -

+ +

a Pic object represents an image in your worksheet Worksheet#add_image is +the recommended way to manage images in your sheets

@@ -120,9 +119,8 @@ the recommended way to manage images in your sheets
ALLOWED_EXTENSIONS =
-

-allowed file extenstions -

+ +

allowed file extenstions

@@ -132,8 +130,7 @@ allowed file extenstions
-
['gif', 'jpeg', 'png', 'jpg']
-
+
['gif', 'jpeg', 'png', 'jpg']
@@ -161,9 +158,8 @@ allowed file extenstions -

-The anchor for this image. -

+
+

The anchor for this image.

@@ -188,9 +184,8 @@ The anchor for this image. -

-A description of the picture. -

+
+

A description of the picture.

@@ -215,10 +210,9 @@ A description of the picture. -

-The path to the image you want to include Only local images are supported -at this time and only jpg support. -

+
+

The path to the image you want to include Only local images are supported +at this time and only jpg support.

@@ -243,9 +237,8 @@ at this time and only jpg support. -

-The name to use for this picture. -

+
+

The name to use for this picture.

@@ -280,9 +273,8 @@ The name to use for this picture. -

-returns the extension of image_src without the preceeding ’.’. -

+
+

returns the extension of image_src without the preceeding '.'.

@@ -304,9 +296,8 @@ returns the extension of image_src without the preceeding ’.’. -

-The file name of image_src without any path information. -

+
+

The file name of image_src without any path information.

@@ -328,9 +319,8 @@ The file name of image_src without any path information. -

-providing access to update the anchor’s height attribute. -

+
+

providing access to update the anchor's height attribute.

@@ -373,9 +363,8 @@ providing access to update the anchor’s height attribute. -

-The index of this image in the workbooks images collections. -

+
+

The index of this image in the workbooks images collections.

@@ -399,9 +388,8 @@ The index of this image in the workbooks images collections. -

-Creates a new Pic(ture) object. -

+
+

Creates a new Pic(ture) object.

@@ -423,10 +411,9 @@ Creates a new Pic(ture) object. -

-The part name for this image used in serialization and relationship -building. -

+
+

The part name for this image used in serialization and relationship +building.

@@ -448,11 +435,10 @@ building. -

-This is a short cut method to set the start anchor position If you need +

+

This is a short cut method to set the start anchor position If you need finer granularity in positioning use graphic_frame.anchor.from.colOff / -rowOff. -

+rowOff.

@@ -474,9 +460,8 @@ rowOff. -

-Serializes the picture. -

+
+

Serializes the picture.

@@ -498,9 +483,8 @@ Serializes the picture. -

-providing access to the anchor’s width attribute. -

+
+

providing access to the anchor's width attribute.

@@ -542,9 +526,8 @@ providing access to the anchor’s width attribute.

-

-Creates a new Pic(ture) object -

+ +

Creates a new Pic(ture) object

@@ -563,9 +546,8 @@ Creates a new Pic(ture) object — -

-the anchor that holds this image -

+
+

the anchor that holds this image

@@ -582,9 +564,8 @@ the anchor that holds this image — -

-a customizable set of options -

+
+

a customizable set of options

@@ -682,9 +663,8 @@ a customizable set of options — -

-the object that the method was called on -

+
+

the object that the method was called on

@@ -710,16 +690,15 @@ the object that the method was called on
# File 'lib/axlsx/drawing/pic.rb', line 38
 
-def initialize(anchor, options={})
-  @anchor = anchor
-  @anchor.drawing.worksheet.workbook.images << self
-  options.each do |o|
-    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
-  end
-  start_at(*options[:start_at]) if options[:start_at]
-  yield self if block_given?
-end
-
+def initialize(anchor, options={}) + @anchor = anchor + @anchor.drawing.worksheet.workbook.images << self + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end + start_at(*options[:start_at]) if options[:start_at] + yield self if block_given? +end @@ -742,9 +721,8 @@ the object that the method was called on

-

-The anchor for this image -

+ +

The anchor for this image

@@ -778,10 +756,9 @@ The anchor for this image
# File 'lib/axlsx/drawing/pic.rb', line 27
 
-def anchor
-  @anchor
-end
-
+def anchor + @anchor +end @@ -799,9 +776,8 @@ The anchor for this image

-

-A description of the picture -

+ +

A description of the picture

@@ -835,10 +811,9 @@ A description of the picture
# File 'lib/axlsx/drawing/pic.rb', line 18
 
-def descr
-  @descr
-end
-
+def descr + @descr +end @@ -856,10 +831,9 @@ A description of the picture

-

-The path to the image you want to include Only local images are supported -at this time and only jpg support -

+ +

The path to the image you want to include Only local images are supported +at this time and only jpg support

@@ -893,10 +867,9 @@ at this time and only jpg support
# File 'lib/axlsx/drawing/pic.rb', line 23
 
-def image_src
-  @image_src
-end
-
+def image_src + @image_src +end @@ -914,9 +887,8 @@ at this time and only jpg support

-

-The name to use for this picture -

+ +

The name to use for this picture

@@ -950,10 +922,9 @@ The name to use for this picture
# File 'lib/axlsx/drawing/pic.rb', line 13
 
-def name
-  @name
-end
-
+def name + @name +end @@ -975,9 +946,8 @@ The name to use for this picture

-

-returns the extension of image_src without the preceeding ’.’ -

+ +

returns the extension of image_src without the preceeding '.'

@@ -1011,10 +981,9 @@ returns the extension of image_src without the preceeding ’.’
# File 'lib/axlsx/drawing/pic.rb', line 70
 
-def extname
-  File.extname(image_src).delete('.') unless image_src.nil?
-end
-
+def extname + File.extname(image_src).delete('.') unless image_src.nil? +end @@ -1029,9 +998,8 @@ returns the extension of image_src without the preceeding ’.’

-

-The file name of image_src without any path information -

+ +

The file name of image_src without any path information

@@ -1065,10 +1033,9 @@ The file name of image_src without any path information
# File 'lib/axlsx/drawing/pic.rb', line 64
 
-def file_name
-  File.basename(image_src) unless image_src.nil?
-end
-
+def file_name + File.basename(image_src) unless image_src.nil? +end @@ -1083,9 +1050,8 @@ The file name of image_src without any path information

-

-providing access to update the anchor’s height attribute -

+ +

providing access to update the anchor's height attribute

@@ -1128,10 +1094,9 @@ providing access to update the anchor’s height attribute
# File 'lib/axlsx/drawing/pic.rb', line 101
 
-def height
-  @anchor.height
-end
-
+def height + @anchor.height +end @@ -1173,10 +1138,9 @@ providing access to update the anchor’s height attribute
# File 'lib/axlsx/drawing/pic.rb', line 106
 
-def height=(v)
-  @anchor.height = v
-end
-
+def height=(v) + @anchor.height = v +end @@ -1191,9 +1155,8 @@ providing access to update the anchor’s height attribute

-

-The index of this image in the workbooks images collections -

+ +

The index of this image in the workbooks images collections

@@ -1227,10 +1190,9 @@ The index of this image in the workbooks images collections
# File 'lib/axlsx/drawing/pic.rb', line 76
 
-def index
-  @anchor.drawing.worksheet.workbook.images.index(self)
-end
-
+def index + @anchor.drawing.worksheet.workbook.images.index(self) +end @@ -1245,10 +1207,9 @@ The index of this image in the workbooks images collections

-

-The part name for this image used in serialization and relationship -building -

+ +

The part name for this image used in serialization and relationship +building

@@ -1282,10 +1243,9 @@ building
# File 'lib/axlsx/drawing/pic.rb', line 82
 
-def pn
-  "#{IMAGE_PN % [(index+1), extname]}"
-end
-
+def pn + "#{IMAGE_PN % [(index+1), extname]}" +end @@ -1300,11 +1260,10 @@ building

-

-This is a short cut method to set the start anchor position If you need + +

This is a short cut method to set the start anchor position If you need finer granularity in positioning use graphic_frame.anchor.from.colOff / -rowOff -

+rowOff

@@ -1323,9 +1282,8 @@ rowOff — -

-The column -

+
+

The column

@@ -1340,9 +1298,8 @@ The column — -

-The row -

+
+

The row

@@ -1377,11 +1334,10 @@ The row
# File 'lib/axlsx/drawing/pic.rb', line 116
 
-def start_at(x, y)
-  @anchor.from.col = x
-  @anchor.from.row = y
-end
-
+def start_at(x, y) + @anchor.from.col = x + @anchor.from.row = y +end @@ -1396,9 +1352,8 @@ The row

-

-Serializes the picture -

+ +

Serializes the picture

@@ -1417,9 +1372,8 @@ Serializes the picture — -

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

+
+

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

@@ -1475,32 +1429,31 @@ The document builder instance this objects xml will be added to.
# File 'lib/axlsx/drawing/pic.rb', line 124
 
-def to_xml(xml)
-  xml.send('xdr:pic') {
-    xml.send('xdr:nvPicPr') {
-      xml.send('xdr:cNvPr', :id=>"2", :name=>name, :descr=>descr)
-      xml.send('xdr:cNvPicPr') {
-        xml.send('a:picLocks', :noChangeAspect=>1)
-      }
-    }
-    xml.send('xdr:blipFill') {
-      xml.send('a:blip', :'xmlns:r' => XML_NS_R, :'r:embed'=>"rId1")
-      xml.send('a:stretch') {
-        xml.send('a:fillRect')
-      }
-    }
-    xml.send('xdr:spPr') {
-      xml.send('a:xfrm') {
-        xml.send('a:off', :x=>0, :y=>0)
-        xml.send('a:ext', :cx=>2336800, :cy=>2161540)
-      }
-      xml.send('a:prstGeom', :prst=>:rect) {
-        xml.send('a:avLst')
-      }
-    }
-  }
-end
-
+def to_xml(xml) + xml.send('xdr:pic') { + xml.send('xdr:nvPicPr') { + xml.send('xdr:cNvPr', :id=>"2", :name=>name, :descr=>descr) + xml.send('xdr:cNvPicPr') { + xml.send('a:picLocks', :noChangeAspect=>1) + } + } + xml.send('xdr:blipFill') { + xml.send('a:blip', :xmlns:r' => XML_NS_R, :r:embed'=>"rId1") + xml.send('a:stretch') { + xml.send('a:fillRect') + } + } + xml.send('xdr:spPr') { + xml.send('a:xfrm') { + xml.send('a:off', :x=>0, :y=>0) + xml.send('a:ext', :cx=>2336800, :cy=>2161540) + } + xml.send('a:prstGeom', :prst=>:rect) { + xml.send('a:avLst') + } + } + } +end @@ -1515,9 +1468,8 @@ The document builder instance this objects xml will be added to.

-

-providing access to the anchor’s width attribute -

+ +

providing access to the anchor's width attribute

@@ -1560,10 +1512,9 @@ providing access to the anchor’s width attribute
# File 'lib/axlsx/drawing/pic.rb', line 89
 
-def width
-  @anchor.width
-end
-
+def width + @anchor.width +end @@ -1605,10 +1556,9 @@ providing access to the anchor’s width attribute
# File 'lib/axlsx/drawing/pic.rb', line 94
 
-def width=(v)
-  @anchor.width = v
-end
-
+def width=(v) + @anchor.width = v +end @@ -1619,9 +1569,9 @@ providing access to the anchor’s width attribute
-- cgit v1.2.3