prawn-svg 0.9.1.9 → 0.9.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -103,7 +103,7 @@ class Prawn::Svg::Parser
103
103
  x, y = point.split(",")
104
104
  [x(x), y(y)]
105
105
  end
106
- element.add_call "polygon", points
106
+ element.add_call "polygon", *points
107
107
 
108
108
  when 'circle'
109
109
  element.add_call "circle_at",
@@ -21,7 +21,7 @@ module Prawn
21
21
  cmd = c
22
22
  values = []
23
23
  value = ""
24
- elsif c >= '0' && c <= '9' || c == '.' || c == "-"
24
+ elsif c >= '0' && c <= '9' || c == '.' || (c == "-" && value == "")
25
25
  unless cmd
26
26
  raise InvalidError, "Numerical value specified before character command in SVG path data"
27
27
  end
@@ -31,6 +31,9 @@ module Prawn
31
31
  values << value.to_f
32
32
  value = ""
33
33
  end
34
+ elsif c == '-'
35
+ values << value.to_f
36
+ value = c
34
37
  else
35
38
  raise InvalidError, "Invalid character '#{c}' in SVG path data"
36
39
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 9
8
8
  - 1
9
- - 9
10
- version: 0.9.1.9
9
+ - 10
10
+ version: 0.9.1.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Roger Nesbitt
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-06 00:00:00 +01:00
18
+ date: 2010-06-15 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency