prawn-svg 0.9.1.6 → 0.9.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,22 +0,0 @@
1
- module Prawn
2
- class Document
3
- #
4
- # Draws an SVG document into the PDF.
5
- #
6
- # +options+ must contain the key :at, which takes a tuple of x and y co-ordinates.
7
- #
8
- # +options+ can optionally contain the key :width or :height. If both are
9
- # specified, only :width will be used. If neither are specified, the resolution
10
- # given in the SVG will be used.
11
- #
12
- # Example usage:
13
- #
14
- # svg IO.read("example.svg"), :at => [100, 300], :width => 600
15
- #
16
- def svg(data, options={})
17
- svg = Prawn::Svg.new(data, self, options)
18
- svg.draw
19
- {:warnings => svg.parser_warnings, :width => svg.parser.width, :height => svg.parser.height}
20
- end
21
- end
22
- end