svgstack 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d2eb1336f84071ff927fe47a7e4bc3648188e24e1abc1aea1ac7658fd1f19434
4
+ data.tar.gz: 826f69323600074ed5f57ff449b272e7f209eadb94cc2fd36ce1b10b96d847a6
5
+ SHA512:
6
+ metadata.gz: 1806321fe1adbd2e5c50f76136df91a7726149bd4731da9f475df37c78945b8e57481f3bd03cfe95db7c7e2e5aa317d2b60e7e29d6e9e5285e9728d3a7f52aab
7
+ data.tar.gz: eb382e514ef2cf3d64f316c3be504e46f80140ceb2797e40739fbeb85781797184ceade1b24ad1a70a99ea37d504cc74583be025147b511d12c5d2efed7c14f2
checksums.yaml.gz.sig ADDED
Binary file
data/lib/svgstack.rb ADDED
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: svgstack.rb
4
+
5
+ # description: A 1st attempt at creating a stack using SVG
6
+
7
+ require 'victor'
8
+
9
+
10
+ module RegGem
11
+
12
+ def self.register()
13
+ '
14
+ hkey_gems
15
+ doctype
16
+ svgstack
17
+ require svgstack
18
+ class SvgStack
19
+ media_type svg
20
+ '
21
+ end
22
+ end
23
+
24
+ class SvgStack
25
+
26
+ def initialize(data=nil, x: 0, y: 0, width: 700, height: 70)
27
+
28
+ boxes = data if data.is_a? Array
29
+
30
+ @svg = Victor::SVG.new viewBox: [x, y, width, height].join(' ')
31
+ build boxes
32
+
33
+ end
34
+
35
+ def save(file='untitled')
36
+ @svg.save file
37
+ end
38
+
39
+ private
40
+
41
+ def build(labels)
42
+
43
+ y = 0
44
+
45
+ labels.each do |label|
46
+
47
+ @svg.g do
48
+ @svg.rect x: 50, y: y, width: 100, height: 40, fill: '#362'
49
+ @svg.text label, x: 60, y: y+20, font_family: 'arial',
50
+ font_weight: 'bold', font_size: 20, fill: 'blue'
51
+ end
52
+
53
+ y+=50
54
+
55
+ end
56
+
57
+ end
58
+
59
+ end
data.tar.gz.sig ADDED
@@ -0,0 +1 @@
1
+ �#�����7�Ε�N���d`�����O+�.N��n)y�]¬�y�-I��?Yexv����ʟg<��q�����iG�U(�2�� r���|��z��1��4{���Sg鍡�6����W49h���گ���F6���m�Rl��=S����u�o�����C�-w�S��r���?Et��``#h �o���Z`��S;��&ި6d��H����:W�G�X=�p��U�O��ܳ�����,�y[������}��%��i9�,z� $4��ĵc���:�c�E �@KE��
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: svgstack
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
14
+ YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkwNjAzMjE1MTA3WhcN
15
+ MjAwNjAyMjE1MTA3WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
+ cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDDv5RW
17
+ phl4Yvl9gs/Szw9SgDea6Q8DxpLwJm5lZ/6liWP34n4J4uutp2Bts/vWorgKj6Do
18
+ LdlzqGktC52UnbJQgF3Lk6PzENyRzR8rBYyGooIMONDHn67c/fl/jhCVg2q1o8UV
19
+ cDPxyypttjSFN3OLEAkY8xXUMXYT26XZZtH4XfOsM1cxXuJx0GMed9XUq1dCTtP0
20
+ zdRQrHf2n8Vx/hDgxnuG2OnlyB2YRWmYOswIAthZmCQ5cGOFY7K9+8/w3veugGbT
21
+ xnBqjTb9F89+GGf3JWOvzlfpAMn3n9sQxUJdoKbYlcMMQdbUqLQ1A+58B/GOl4ZV
22
+ nNPiT/gD5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+ - !ruby/object:Gem::Dependency
41
+ name: victor
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.2'
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.2.6
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '0.2'
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 0.2.6
60
+ description:
61
+ email: james@jamesrobertson.eu
62
+ executables: []
63
+ extensions: []
64
+ extra_rdoc_files: []
65
+ files:
66
+ - lib/svgstack.rb
67
+ homepage: https://github.com/jrobertson/svgstack
68
+ licenses:
69
+ - MIT
70
+ metadata: {}
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubygems_version: 3.0.1
87
+ signing_key:
88
+ specification_version: 4
89
+ summary: A 1st attempt at creating a stack using SVG. Under development.
90
+ test_files: []
metadata.gz.sig ADDED
Binary file