svgle 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/lib/svgle.rb +24 -10
  5. metadata +25 -25
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28139b51fe5a2183cd06ba778476f068c2de7dd5f74eae78e1150a3b6df70e20
4
- data.tar.gz: b942704de913c3140b51618f19bb2ad6dcb2443b57a0d4ee316e7600d3e91b15
3
+ metadata.gz: 0fb055aaee37ccc0fa5120270db02d20c030e42585c5734b9eb5e9016ec68a09
4
+ data.tar.gz: c628f66d2b9f4dbb4450cd4d39c187dac14083c89c77f6af3b5283f6c6b2ae18
5
5
  SHA512:
6
- metadata.gz: 1cd7b3b0fd5314bb7e5dd5941a0c7f634cb69f45e75b7d9044f8ebdbc89e7e1d5b02f31992bc6c23f2993399434d75fe4884af1814e8aa5e492e03ff75eb47c7
7
- data.tar.gz: 39130f99c9354e3311f6bdb1312175641eef27026e16aa2be5383fc26a17985f0956fc7e864776efd8756356b92e3788761cce417acf0c78a4b3edca53df8b81
6
+ metadata.gz: 1d6e8ef0ad700fbfc9aa946d329b63c33145ddbda57f1b15a29ed5ebd32653ecdc8bbbbd253ca8fe4ff26a3744f2dd965f1ebb95ab7148150b3d0d8228ee6b39
7
+ data.tar.gz: 4cb552836d8ad8094dda484df33d111643a80fbe9b553f0a609b4681172e45ffa8046c03fb0406214f000bbffc47b9abbba366591f32c3eb52457be5f7cfbd8f
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -28,7 +28,15 @@ CSS
28
28
 
29
29
 
30
30
  class Svgle < Domle
31
+
32
+
33
+ class SvgElement < Element
34
+ attr2_accessor *%i(stroke stroke-width)
35
+ end
31
36
 
37
+ class Shape < SvgElement
38
+ attr2_accessor *%i(fill)
39
+ end
32
40
 
33
41
  class A < Element
34
42
  # undecided how to implement this
@@ -36,14 +44,14 @@ class Svgle < Domle
36
44
  #attr2_accessor *%i(href)
37
45
  end
38
46
 
39
- class Circle < Element
40
- attr2_accessor *%i(cx cy r stroke stroke-width)
47
+ class Circle < Shape
48
+ attr2_accessor *%i(cx cy r)
41
49
  def boundary()
42
50
  [0,0,0,0]
43
51
  end
44
52
  end
45
53
 
46
- class Ellipse < Element
54
+ class Ellipse < Shape
47
55
  attr2_accessor *%i(cx cy rx ry)
48
56
  def boundary()
49
57
  [0,0,0,0]
@@ -57,7 +65,7 @@ class Svgle < Domle
57
65
  end
58
66
  end
59
67
 
60
- class Line < Element
68
+ class Line < SvgElement
61
69
  attr2_accessor *%i(x1 y1 x2 y2)
62
70
 
63
71
  def boundary()
@@ -93,30 +101,30 @@ class Svgle < Domle
93
101
 
94
102
  end
95
103
 
96
- class Path < Element
97
- attr2_accessor *%i(d stroke stroke-width fill)
104
+ class Path < Shape
105
+ attr2_accessor *%i(d)
98
106
  def boundary()
99
107
  [0,0,0,0]
100
108
  end
101
109
  end
102
110
 
103
- class Polygon < Element
111
+ class Polygon < Shape
104
112
  attr2_accessor *%i(points)
105
113
  def boundary()
106
114
  [0,0,0,0]
107
115
  end
108
116
  end
109
117
 
110
- class Polyline < Element
118
+ class Polyline < Shape
111
119
  attr2_accessor *%i(points)
112
120
  def boundary()
113
121
  [0,0,0,0]
114
122
  end
115
123
  end
116
124
 
117
- class Rect < Element
125
+ class Rect < Shape
118
126
 
119
- attr2_accessor *%i(x y width height rx ry)
127
+ attr2_accessor *%i(x y rx ry)
120
128
 
121
129
  def boundary()
122
130
  x1, y1, w, h = [x, y, width, height].map(&:to_i)
@@ -131,6 +139,7 @@ class Svgle < Domle
131
139
  [0,0,0,0]
132
140
  end
133
141
  end
142
+
134
143
 
135
144
  class Text < Element
136
145
  attr2_accessor *%i(x y fill)
@@ -139,6 +148,10 @@ class Svgle < Domle
139
148
  end
140
149
  end
141
150
 
151
+ def initialize(src='<svg/>', callback: nil, rexle: self, debug: false)
152
+ super(src, callback: callback, rexle: rexle, debug: debug)
153
+ end
154
+
142
155
  def inspect()
143
156
  "#<Svgle:%s>" % [self.object_id]
144
157
  end
@@ -148,6 +161,7 @@ class Svgle < Domle
148
161
 
149
162
  def add_default_css()
150
163
  add_css DEFAULT_CSS
164
+ add_inline_css()
151
165
  end
152
166
 
153
167
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svgle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -11,31 +11,31 @@ cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
14
- YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkwMjA5MTg0NTA0WhcN
15
- MjAwMjA5MTg0NTA0WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
- cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDXeugy
17
- 8j3ASe/K8C0pgaS2FFXQ9iQfI2ZfXtK2c8bUvzFowjWpWgy/IVhmM7SqqdwGqiPI
18
- otcVz9r6+BehcGiiwi3LUXbIIkBYo5ZRtuFl6fdaRcP8VAmxk43ti32HJfzWT7we
19
- BqbF9R7CIKi0ruOvlOmA8lJISG7kCd93tobIG6fxvAgGu0Hq4ELcTIkeuhjjaUQv
20
- MGnIyflEn+HDA4X6G9q/sp+AVqIKmXUEfQcAURdxw4imC0a1o2MBTSfLZDOclGIz
21
- ZJwBVGKlBCVNfaqK/cHkG1UlvJ2cgxgE/LGdxLHY6YCinFny2NNM47WfQ3Royoas
22
- mQ0uzvziM02a5bfYIw+Eq8NlKEijr2aLe6Nnb003z6Q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Rj4WgPd7nCIjy81BtItELhQzoAtxoBgahAlX8V0yPo5eHCzJP/oXucrkP7i6IC7
33
+ 4D9+g3UMzF8+t+yKNgkJuE76azBKyfEKJnhYGnEOI9nIVfmxc65CBjzi13D1pLr1
34
+ gmp68bAqiT60sJfRlJtEtTKkdcQtPVKj4NPYAt+QItdUKNx9xuBmIZpYmpQnbdrN
35
+ NIUWaOW01S4o47sU3I51CSMWxo0LvDUyjQ5BahXzrnkaUCAZxlAAIqXum9zvCr5K
36
+ qG+QACUIuvQdA+C3SKv19pE2
37
37
  -----END CERTIFICATE-----
38
- date: 2019-02-24 00:00:00.000000000 Z
38
+ date: 2020-05-12 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: domle
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  requirements: []
86
- rubygems_version: 3.0.1
86
+ rubygems_version: 3.0.3
87
87
  signing_key:
88
88
  specification_version: 4
89
89
  summary: Svgle (SVG + Domle) generates an SVG Document Object Model from the given
metadata.gz.sig CHANGED
Binary file