gtk2svg 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: baf3f4e66c486dd4add79ab6ba11251f89719e2e
4
- data.tar.gz: a3e8456c3f352399c71c1042fe1609f4b14893f8
3
+ metadata.gz: c5be3754156b1ec03b679394e67fb8868014ca80
4
+ data.tar.gz: bae9e68e7fba17040185e0d7d65c64836fb7aa07
5
5
  SHA512:
6
- metadata.gz: e61d1ff7313ef58af73bee4d69a4f770c25150342c677a83dc03092b7faa4c0da2beceafccbd4215f020a77036abe87b1fe11be7bbc5b252880540195559697d
7
- data.tar.gz: 480ef78d9cb337c5ffaa21a6179f598ccb7675ee27295bfbb5f4b84490d9167992e9a29a6805b0656650664e4b52f2bfbd759a657fe5effdf9564dae056b003d
6
+ metadata.gz: 2725b4b317ad74dadcdde1d8e7e55abdce0191df832baabe566e35fa1954e8f6629933297c0fa5e4521b0f32f4a30b638065e0f3d6ad46db927375f35afe4c38
7
+ data.tar.gz: 913875d76a66c881235ef872c48d2aea2d34a738c462a415ff591970e0f04dac8f57bded1f340edbb7f749941c97025818d4f1acd933dd164252689388a15915
@@ -1,2 +1,4 @@
1
- I��t���b�N
2
- C�L��+��*�E9���x6'�wE � ��f��d'z3�{�2� �ZʠK�;��GF�y*5I�pUxz��<���f_��(�"1�S�b���`�Df@�-����F��Of���c��r{�梽�K��=������&��ՠ�� 3��l��v�wk�N9l�����.3q��^�>e
1
+ :�\J��-a5� �Z�Ļ�sY1��1q� f�s_�6K];����j�Ej���u5-O���[(�Ѽ�reo3�o�7�b5.b@L�<ug���"� �JD�!�}�F�|� � ���0��
2
+ "[H��&p��Ϩ�J����Vw!4��D�-�_8��@�ʨu:��\!�Y��0i?
3
+ J
4
+ l�{nlw<@��.��#����7c���@�y�Ϗ�x�IDn���o�֐%64\��x��$����٨�ܩ
data.tar.gz.sig CHANGED
Binary file
@@ -7,9 +7,6 @@ require 'dom_render'
7
7
  require 'svgle'
8
8
 
9
9
 
10
- # Description: Experimental gem to render SVG within an GTK2 application.
11
-
12
-
13
10
  module Gtk2SVG
14
11
 
15
12
  class Render < DomRender
@@ -45,6 +42,14 @@ module Gtk2SVG
45
42
  [:draw_line, [x1, y1, x2, y2], style, render_all(e)]
46
43
  end
47
44
 
45
+ def polygon(e, attributes, style)
46
+
47
+ points = attributes[:points].split(/\s+/). \
48
+ map {|x| x.split(/\s*,\s*/).map(&:to_i)}
49
+
50
+ [:draw_polygon, points, style, render_all(e)]
51
+ end
52
+
48
53
  def rect(e, attributes, style)
49
54
 
50
55
  h = attributes
@@ -105,6 +110,17 @@ module Gtk2SVG
105
110
  Gdk::GC::CAP_NOT_LAST, Gdk::GC::JOIN_MITER)
106
111
  @area.window.draw_line(gc, x1, y1, x2, y2)
107
112
  end
113
+
114
+ def draw_polygon(args)
115
+
116
+ points, style = args
117
+
118
+
119
+ gc = gc_ini(fill: style[:fill] || :none, stroke: style[:stroke] || :none)
120
+ gc.set_line_attributes(style[:stroke_width].to_i, Gdk::GC::LINE_SOLID, \
121
+ Gdk::GC::CAP_NOT_LAST, Gdk::GC::JOIN_MITER)
122
+ @area.window.draw_polygon(gc, 1, points)
123
+ end
108
124
 
109
125
  def draw_rectangle(args)
110
126
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk2svg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  fnNu6z0ydxzHCvBhE0pU4jDzxPTASZiyllpSpQgz9OX3DAlUgWFQLHmj1hGk6GH4
32
32
  QldMu2GTc/3h2w==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-11-23 00:00:00.000000000 Z
34
+ date: 2015-11-24 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: gtk2
metadata.gz.sig CHANGED
Binary file