examples/shape8.rb in write_xlsx-1.09.4 vs examples/shape8.rb in write_xlsx-1.09.5
- old
+ new
@@ -20,30 +20,30 @@
ch = 60
cx = 210
cy = 190
ellipse = workbook.add_shape(
- :type => 'ellipse',
- :id => 2,
- :text => "Hello\nWorld",
- :width => cw,
- :height => ch
- )
+ :type => 'ellipse',
+ :id => 2,
+ :text => "Hello\nWorld",
+ :width => cw,
+ :height => ch
+)
worksheet.insert_shape('A1', ellipse, cx, cy)
# Add a plus sign at 4 different positionos around the circle.
pw = 20
ph = 20
px = 120
py = 250
plus = workbook.add_shape(
- :type => 'plus',
- :id => 3,
- :width => pw,
- :height => ph
- )
+ :type => 'plus',
+ :id => 3,
+ :width => pw,
+ :height => ph
+)
p1 = worksheet.insert_shape('A1', plus, 350, 150)
p2 = worksheet.insert_shape('A1', plus, 350, 350)
p3 = worksheet.insert_shape('A1', plus, 150, 350)
p4 = worksheet.insert_shape('A1', plus, 150, 150)
@@ -57,16 +57,16 @@
cxn_shape.end = p1.id
cxn_shape.end_index = 3 # 3rd connection point on plus, right side
cxn_shape.end_side = 'l' # l)eft or t)op.
worksheet.insert_shape('A1', cxn_shape, 0, 0)
-cxn_shape.end = p2.id
+cxn_shape.end = p2.id
worksheet.insert_shape('A1', cxn_shape, 0, 0)
-cxn_shape.end = p3.id
+cxn_shape.end = p3.id
worksheet.insert_shape('A1', cxn_shape, 0, 0)
-cxn_shape.end = p4.id
+cxn_shape.end = p4.id
cxn_shape.adjustments = [-50, 45, 120]
worksheet.insert_shape('A1', cxn_shape, 0, 0)
workbook.close