prawn-svg 0.9.1.10 → 0.9.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. data/.gitignore +5 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +14 -0
  4. data/Rakefile +26 -0
  5. data/lib/prawn/svg/element.rb +7 -2
  6. data/lib/prawn/svg/font.rb +7 -4
  7. data/lib/prawn/svg/parser.rb +12 -4
  8. data/lib/prawn/svg/version.rb +5 -0
  9. data/prawn-svg.gemspec +23 -0
  10. data/spec/lib/parser_spec.rb +58 -0
  11. data/spec/lib/path_spec.rb +38 -0
  12. data/spec/lib/svg_spec.rb +22 -0
  13. data/spec/prawn/svg/document_spec.rb +27 -0
  14. data/spec/prawn/svg/element_spec.rb +32 -0
  15. data/spec/prawn/svg/font_spec.rb +31 -0
  16. data/spec/prawn/svg/parser/text_spec.rb +4 -0
  17. data/spec/sample_output/directory +0 -0
  18. data/spec/sample_svg/arcs01.svg +21 -0
  19. data/spec/sample_svg/circle01.svg +12 -0
  20. data/spec/sample_svg/cubic01.svg +37 -0
  21. data/spec/sample_svg/cubic01a.svg +40 -0
  22. data/spec/sample_svg/cubic02.svg +86 -0
  23. data/spec/sample_svg/ellipse01.svg +17 -0
  24. data/spec/sample_svg/line01.svg +22 -0
  25. data/spec/sample_svg/maths.svg +34 -0
  26. data/spec/sample_svg/omnigraffle.svg +41 -0
  27. data/spec/sample_svg/opacity01.svg +42 -0
  28. data/spec/sample_svg/polygon01.svg +17 -0
  29. data/spec/sample_svg/polyline01.svg +18 -0
  30. data/spec/sample_svg/quad01.svg +28 -0
  31. data/spec/sample_svg/rect01.svg +12 -0
  32. data/spec/sample_svg/rect02.svg +16 -0
  33. data/spec/sample_svg/rotate_scale.svg +38 -0
  34. data/spec/sample_svg/scruffy_graph.svg +134 -0
  35. data/spec/sample_svg/triangle01.svg +12 -0
  36. data/spec/sample_svg/tspan01.svg +17 -0
  37. data/spec/sample_svg/tspan02.svg +22 -0
  38. data/spec/sample_svg/tspan03.svg +21 -0
  39. data/spec/sample_svg/use.svg +17 -0
  40. data/spec/spec_helper.rb +9 -0
  41. metadata +103 -15
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg width="4cm" height="4cm" viewBox="0 0 400 400"
5
+ xmlns="http://www.w3.org/2000/svg" version="1.1">
6
+ <title>Example triangle01- simple example of a 'path'</title>
7
+ <desc>A path that draws a triangle</desc>
8
+ <rect x="1" y="1" width="398" height="398"
9
+ fill="none" stroke="blue" />
10
+ <path d="M 100 100 L 300 100 L 200 300 z"
11
+ fill="red" stroke="blue" stroke-width="3" />
12
+ </svg>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg width="10cm" height="3cm" viewBox="0 0 1000 300"
5
+ xmlns="http://www.w3.org/2000/svg" version="1.1">
6
+ <desc>Example tspan01 - using tspan to change visual attributes</desc>
7
+ <g font-family="Verdana" font-size="45" >
8
+ <text x="200" y="150" fill="blue" >
9
+ You are
10
+ <tspan font-weight="bold" fill="red" >not</tspan>
11
+ a banana.
12
+ </text>
13
+ </g>
14
+ <!-- Show outline of canvas using 'rect' element -->
15
+ <rect x="1" y="1" width="998" height="298"
16
+ fill="none" stroke="blue" stroke-width="2" />
17
+ </svg>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg width="10cm" height="3cm" viewBox="0 0 1000 300"
5
+ xmlns="http://www.w3.org/2000/svg" version="1.1">
6
+ <desc>Example tspan02 - using tspan's dx and dy attributes
7
+ for incremental positioning adjustments</desc>
8
+ <g font-family="Verdana" font-size="45" >
9
+ <text x="200" y="150" fill="blue" >
10
+ But you
11
+ <tspan dx="2em" dy="-50" font-weight="bold" fill="red" >
12
+ are
13
+ </tspan>
14
+ <tspan dy="100">
15
+ a peach!
16
+ </tspan>
17
+ </text>
18
+ </g>
19
+ <!-- Show outline of canvas using 'rect' element -->
20
+ <rect x="1" y="1" width="998" height="298"
21
+ fill="none" stroke="blue" stroke-width="2" />
22
+ </svg>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg width="10cm" height="3cm" viewBox="0 0 1000 300"
5
+ xmlns="http://www.w3.org/2000/svg" version="1.1">
6
+ <desc>Example tspan03 - using tspan's x and y attributes
7
+ for multiline text and precise glyph positioning</desc>
8
+ <g font-family="Verdana" font-size="45" >
9
+ <text fill="rgb(255,164,0)" >
10
+ <tspan x="300 350 400 450 500 550 600 650" y="100">
11
+ Cute and
12
+ </tspan>
13
+ <tspan x="375 425 475 525 575" y="200">
14
+ fuzzy
15
+ </tspan>
16
+ </text>
17
+ </g>
18
+ <!-- Show outline of canvas using 'rect' element -->
19
+ <rect x="1" y="1" width="998" height="298"
20
+ fill="none" stroke="blue" stroke-width="2" />
21
+ </svg>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg width="12cm" height="4cm" viewBox="0 0 1200 400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink='http://www.w3.org/1999/xlink' version="1.1">
4
+ <symbol id="two-rects">
5
+ <rect x="1" y="1" width="1198" height="398" fill="none" stroke="blue" stroke-width="2"/>
6
+ <rect x="400" y="100" width="400" height="200" fill="yellow" stroke="navy" stroke-width="10" />
7
+ </symbol>
8
+
9
+ <use xlink:href="#two-rects"/>
10
+ <use xlink:href="#two-rects" x="90" y="90"/>
11
+ <use xlink:href="#two-rects" x="180" y="180"/>
12
+
13
+ <circle id="circle" cx="600" cy="200" r="100" fill="red" stroke="blue" stroke-width="10" />
14
+
15
+ <use xlink:href="#circle" x="0" y="0" style="opacity: 0.5;" transform="scale(1.3)"/>
16
+ <use xlink:href="#circle" x="0" y="0" style="opacity: 0.2;" transform="scale(1.7)"/>
17
+ </svg>
@@ -0,0 +1,9 @@
1
+ require 'bundler'
2
+ Bundler.require(:default, :development)
3
+
4
+ # Requires supporting files with custom matchers and macros, etc,
5
+ # in ./support/ and its subdirectories.
6
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
7
+
8
+ RSpec.configure do |config|
9
+ end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-svg
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 21
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
8
  - 9
8
9
  - 1
9
- - 10
10
- version: 0.9.1.10
10
+ - 11
11
+ version: 0.9.1.11
11
12
  platform: ruby
12
13
  authors:
13
14
  - Roger Nesbitt
@@ -15,16 +16,18 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-06-15 00:00:00 +01:00
19
+ date: 2012-04-20 00:00:00 +12:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: prawn
23
24
  prerelease: false
24
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
25
27
  requirements:
26
28
  - - ">="
27
29
  - !ruby/object:Gem::Version
30
+ hash: 55
28
31
  segments:
29
32
  - 0
30
33
  - 8
@@ -33,19 +36,33 @@ dependencies:
33
36
  type: :runtime
34
37
  version_requirements: *id001
35
38
  - !ruby/object:Gem::Dependency
36
- name: prawn-core
39
+ name: rspec
37
40
  prerelease: false
38
41
  requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
39
43
  requirements:
40
44
  - - ">="
41
45
  - !ruby/object:Gem::Version
46
+ hash: 3
42
47
  segments:
43
48
  - 0
44
- - 8
45
- - 4
46
- version: 0.8.4
47
- type: :runtime
49
+ version: "0"
50
+ type: :development
48
51
  version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: rake
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 3
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ type: :development
65
+ version_requirements: *id003
49
66
  description: SVG renderer for Prawn PDF library
50
67
  email: roger@seriousorange.com
51
68
  executables: []
@@ -55,17 +72,54 @@ extensions: []
55
72
  extra_rdoc_files: []
56
73
 
57
74
  files:
58
- - README
75
+ - .gitignore
76
+ - .rspec
77
+ - Gemfile
59
78
  - LICENSE
79
+ - README
80
+ - Rakefile
81
+ - lib/prawn-svg.rb
60
82
  - lib/prawn/svg/document.rb
61
83
  - lib/prawn/svg/element.rb
62
84
  - lib/prawn/svg/extension.rb
63
85
  - lib/prawn/svg/font.rb
64
86
  - lib/prawn/svg/interface.rb
87
+ - lib/prawn/svg/parser.rb
65
88
  - lib/prawn/svg/parser/path.rb
66
89
  - lib/prawn/svg/parser/text.rb
67
- - lib/prawn/svg/parser.rb
68
- - lib/prawn-svg.rb
90
+ - lib/prawn/svg/version.rb
91
+ - prawn-svg.gemspec
92
+ - spec/lib/parser_spec.rb
93
+ - spec/lib/path_spec.rb
94
+ - spec/lib/svg_spec.rb
95
+ - spec/prawn/svg/document_spec.rb
96
+ - spec/prawn/svg/element_spec.rb
97
+ - spec/prawn/svg/font_spec.rb
98
+ - spec/prawn/svg/parser/text_spec.rb
99
+ - spec/sample_output/directory
100
+ - spec/sample_svg/arcs01.svg
101
+ - spec/sample_svg/circle01.svg
102
+ - spec/sample_svg/cubic01.svg
103
+ - spec/sample_svg/cubic01a.svg
104
+ - spec/sample_svg/cubic02.svg
105
+ - spec/sample_svg/ellipse01.svg
106
+ - spec/sample_svg/line01.svg
107
+ - spec/sample_svg/maths.svg
108
+ - spec/sample_svg/omnigraffle.svg
109
+ - spec/sample_svg/opacity01.svg
110
+ - spec/sample_svg/polygon01.svg
111
+ - spec/sample_svg/polyline01.svg
112
+ - spec/sample_svg/quad01.svg
113
+ - spec/sample_svg/rect01.svg
114
+ - spec/sample_svg/rect02.svg
115
+ - spec/sample_svg/rotate_scale.svg
116
+ - spec/sample_svg/scruffy_graph.svg
117
+ - spec/sample_svg/triangle01.svg
118
+ - spec/sample_svg/tspan01.svg
119
+ - spec/sample_svg/tspan02.svg
120
+ - spec/sample_svg/tspan03.svg
121
+ - spec/sample_svg/use.svg
122
+ - spec/spec_helper.rb
69
123
  has_rdoc: true
70
124
  homepage: http://github.com/mogest/prawn-svg
71
125
  licenses: []
@@ -76,25 +130,59 @@ rdoc_options: []
76
130
  require_paths:
77
131
  - lib
78
132
  required_ruby_version: !ruby/object:Gem::Requirement
133
+ none: false
79
134
  requirements:
80
135
  - - ">="
81
136
  - !ruby/object:Gem::Version
137
+ hash: 3
82
138
  segments:
83
139
  - 0
84
140
  version: "0"
85
141
  required_rubygems_version: !ruby/object:Gem::Requirement
142
+ none: false
86
143
  requirements:
87
144
  - - ">="
88
145
  - !ruby/object:Gem::Version
146
+ hash: 3
89
147
  segments:
90
148
  - 0
91
149
  version: "0"
92
150
  requirements: []
93
151
 
94
152
  rubyforge_project:
95
- rubygems_version: 1.3.6
153
+ rubygems_version: 1.6.2
96
154
  signing_key:
97
155
  specification_version: 3
98
156
  summary: SVG renderer for Prawn PDF library
99
- test_files: []
100
-
157
+ test_files:
158
+ - spec/lib/parser_spec.rb
159
+ - spec/lib/path_spec.rb
160
+ - spec/lib/svg_spec.rb
161
+ - spec/prawn/svg/document_spec.rb
162
+ - spec/prawn/svg/element_spec.rb
163
+ - spec/prawn/svg/font_spec.rb
164
+ - spec/prawn/svg/parser/text_spec.rb
165
+ - spec/sample_output/directory
166
+ - spec/sample_svg/arcs01.svg
167
+ - spec/sample_svg/circle01.svg
168
+ - spec/sample_svg/cubic01.svg
169
+ - spec/sample_svg/cubic01a.svg
170
+ - spec/sample_svg/cubic02.svg
171
+ - spec/sample_svg/ellipse01.svg
172
+ - spec/sample_svg/line01.svg
173
+ - spec/sample_svg/maths.svg
174
+ - spec/sample_svg/omnigraffle.svg
175
+ - spec/sample_svg/opacity01.svg
176
+ - spec/sample_svg/polygon01.svg
177
+ - spec/sample_svg/polyline01.svg
178
+ - spec/sample_svg/quad01.svg
179
+ - spec/sample_svg/rect01.svg
180
+ - spec/sample_svg/rect02.svg
181
+ - spec/sample_svg/rotate_scale.svg
182
+ - spec/sample_svg/scruffy_graph.svg
183
+ - spec/sample_svg/triangle01.svg
184
+ - spec/sample_svg/tspan01.svg
185
+ - spec/sample_svg/tspan02.svg
186
+ - spec/sample_svg/tspan03.svg
187
+ - spec/sample_svg/use.svg
188
+ - spec/spec_helper.rb