diff options
| author | Alan Kessler <[email protected]> | 2015-03-14 14:31:26 -0700 |
|---|---|---|
| committer | Alan Kessler <[email protected]> | 2015-03-14 14:31:26 -0700 |
| commit | f0962f91757ff90a7b614dc7f9d625dde32cbb96 (patch) | |
| tree | 508fe6ea81d1d610a08a753795eab67d00319e59 | |
| parent | e00899d292233b3fb886129ce01d042fdf0dd40b (diff) | |
| download | caxlsx-f0962f91757ff90a7b614dc7f9d625dde32cbb96.tar.gz caxlsx-f0962f91757ff90a7b614dc7f9d625dde32cbb96.zip | |
Change option name to 'opacity' and allow value between 0 and 1.
| -rw-r--r-- | lib/axlsx/drawing/pic.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb index 3e21fee9..385229e7 100644 --- a/lib/axlsx/drawing/pic.rb +++ b/lib/axlsx/drawing/pic.rb @@ -23,7 +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] + @opacity = options[:opacity] * 100000 if options[:opacity] #accepts value beween 0..1 end # allowed file extenstions @@ -173,8 +173,8 @@ module Axlsx str << '</xdr:cNvPicPr></xdr:nvPicPr>' str << '<xdr:blipFill>' str << ('<a:blip xmlns:r ="' << XML_NS_R << '" r:embed="' << relationship.Id << '">') - if @alpha - str << "<a:alphaModFix amt=\"#{@alpha}\"/>" + if @opacity + str << "<a:alphaModFix amt=\"#{@opacity}\"/>" end str << '</a:blip>' str << '<a:stretch><a:fillRect/></a:stretch></xdr:blipFill><xdr:spPr>' |
