From e00899d292233b3fb886129ce01d042fdf0dd40b Mon Sep 17 00:00:00 2001 From: Alan Kessler Date: Wed, 28 Jan 2015 15:30:26 -0800 Subject: Make alpha option accessible for pictures 0 = transparent ... 100000 = opaque --- lib/axlsx/drawing/pic.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb index 571e9047..3e21fee9 100644 --- a/lib/axlsx/drawing/pic.rb +++ b/lib/axlsx/drawing/pic.rb @@ -23,6 +23,7 @@ module Axlsx start_at(*options[:start_at]) if options[:start_at] yield self if block_given? @picture_locking = PictureLocking.new(options) + @alpha = options[:alpha] if options[:alpha] end # allowed file extenstions @@ -171,7 +172,11 @@ module Axlsx picture_locking.to_xml_string(str) str << '' str << '' - str << ('') + str << ('') + if @alpha + str << "" + end + str << '' str << '' str << '' str << '' -- cgit v1.2.3