smalruby 0.0.25-x86-mingw32 → 0.0.26-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of smalruby might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d346fac3b28a5b569ced073c36f7bee4282e60ac
4
- data.tar.gz: b31902a8e609e7fa22559e3027b35b682c7ff974
3
+ metadata.gz: fbdf7a1afdee0f3b3c6146f24a86b040aafdedf1
4
+ data.tar.gz: 338eb85a1739c979ff36a9fbd7c3d83fd6f1f61b
5
5
  SHA512:
6
- metadata.gz: 8f4b68718be4eb86c64affe5f01299d670a18af587ce91565c570a805cd15e7230bfdae85c6c6b1efc60367c53e4cadb5ccc03dfd710ab41d54308e479332abb
7
- data.tar.gz: 8846804314cddeedcb5a78b915ed2da5e26915a9c9eaa45b99835d3091beffc06f6bc25e65c578543aa7719a9dc5d13f2ce15ddc707082b35bf98526c9639674
6
+ metadata.gz: 1df9e1b10eb14204ff8b013daaeea528da1ee6b30c8999a5d9173fdf44e65205cb552d103493c4de3cb71522fbfb5a3568fcc9ec7f13c8c9329b79924bdafb2c
7
+ data.tar.gz: c0dbfea0422843bcaed75a15b016f550809a8c353c792ce9cd0063209820a4f71852db6f00af0465fc87d3d1afb07e9657ecdc2a5d746b3b4a1328fcec17ab09
@@ -8,12 +8,15 @@ module Smalruby
8
8
  x: 0,
9
9
  y: 0,
10
10
  width: Window.width,
11
- height: Window.height
11
+ height: Window.height,
12
+ color: nil,
12
13
  }
13
14
  opts = Util.process_options(options, defaults)
14
15
 
15
16
  opts[:costume] = Image.new(opts[:width], opts[:height])
16
- super(opts.reject { |k, _| [:width, :height].include?(k) })
17
+ super(opts.reject { |k, _| [:width, :height, :color].include?(k) })
18
+
19
+ fill(color: opts[:color]) if opts[:color]
17
20
  end
18
21
 
19
22
  # @!group ペン
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  module Smalruby
4
- VERSION = '0.0.25'
4
+ VERSION = '0.0.26'
5
5
  end
@@ -0,0 +1,9 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'smalruby'
3
+
4
+ canvas1 = Canvas.new(color: 'gray')
5
+ canvas1.on(:start) do
6
+ draw_font(x: 0, y: 0, string: 'こんにちは', size: 32)
7
+ line(x1: 0, y1: 100, x2: 100, y2: 200, color: "red")
8
+ box_fill(left: 0, top: 300, right: 100, bottom: 400, color: "green")
9
+ end
data/smalruby.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency 'rspec'
32
32
  spec.add_development_dependency 'coveralls'
33
33
  spec.add_development_dependency 'travis-lint'
34
- spec.add_development_dependency 'rubocop'
34
+ spec.add_development_dependency 'rubocop', '~> 0.16'
35
35
  spec.add_development_dependency 'guard-rspec'
36
36
  spec.add_development_dependency 'guard-rubocop'
37
37
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smalruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Kouji Takao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-08 00:00:00.000000000 Z
11
+ date: 2014-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: rubocop
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '0.16'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ~>
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '0.16'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: guard-rspec
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -271,6 +271,7 @@ files:
271
271
  - lib/smalruby/world.rb
272
272
  - samples/.rubocop.yml
273
273
  - samples/canvas.rb
274
+ - samples/canvas_color.rb
274
275
  - samples/car.rb
275
276
  - samples/cat.rb
276
277
  - samples/console.rb