shogi_koma 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/NEWS.md +10 -0
- data/lib/shogi_koma.rb +0 -1
- data/lib/shogi_koma/painter.rb +4 -2
- data/lib/shogi_koma/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38ea8d2fafff928b5c0d8271fbee74588d2f7cb1
|
4
|
+
data.tar.gz: a1d5e9dac5350be102d5b544a302a5621cf489e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5f22bd0510b94f9e4318547a904531aeb84d334023a8e07b65d186c5246a2d537a4f81a1d108d6762e51dc473c290ae2b82b8d1bfacdba8c102e1d90faf72dd
|
7
|
+
data.tar.gz: e2aa6d6a1b5c940c95faf5de6f12fa6de961c3feb68afafc318355e99d0e6b99fe3355f3a24ada8ca7f4810a65f7c886b7d98cf2c801d55868b67322675c2caa
|
data/.travis.yml
CHANGED
data/NEWS.md
CHANGED
data/lib/shogi_koma.rb
CHANGED
data/lib/shogi_koma/painter.rb
CHANGED
@@ -3,12 +3,13 @@ require "fontdock"
|
|
3
3
|
|
4
4
|
module ShogiKoma
|
5
5
|
class Painter
|
6
|
-
attr_accessor :width, :height, :font
|
6
|
+
attr_accessor :width, :height, :font, :border_scale
|
7
7
|
attr_reader :body_color, :frame_color, :text_color
|
8
8
|
def initialize
|
9
9
|
@width = 200
|
10
10
|
@height = 200
|
11
11
|
@font = "IPAMincho"
|
12
|
+
@border_scale = 1.0
|
12
13
|
set_body_rgb(1, 0.8, 0.2)
|
13
14
|
set_frame_color(:black)
|
14
15
|
set_text_color(:black)
|
@@ -62,7 +63,8 @@ module ShogiKoma
|
|
62
63
|
end
|
63
64
|
|
64
65
|
def draw_body(context)
|
65
|
-
|
66
|
+
border_width = 0.01 * @border_scale
|
67
|
+
context.set_line_width(border_width)
|
66
68
|
context.move_to(0.2, 0.2)
|
67
69
|
context.line_to(0.5, 0.1)
|
68
70
|
context.line_to(0.8, 0.2)
|
data/lib/shogi_koma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shogi_koma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masafumi Yokoyama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cairo
|
@@ -150,10 +150,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.2.
|
153
|
+
rubygems_version: 2.2.2
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: An image generater for Shogi's pieces
|
157
157
|
test_files:
|
158
158
|
- test/run-test.rb
|
159
159
|
- test/test-painter.rb
|
160
|
+
has_rdoc:
|