diff --git a/lib/prawn/images.rb b/lib/prawn/images.rb index 8ee747956..3af712188 100644 --- a/lib/prawn/images.rb +++ b/lib/prawn/images.rb @@ -118,6 +118,18 @@ def embed_image(pdf_obj, info, options) if options[:at] x, y = map_to_absolute(options[:at]) + case options[:position] + when :center + x-=w/2 + when :right + x-=w + end + case options[:vposition] + when :center + y+=h/2 + when :bottom + y+=h + end else x, y = image_position(w, h, options) move_text_position h