basis-processing 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/basis.gemspec +1 -1
  2. data/lib/screen.rb +6 -2
  3. metadata +4 -4
data/basis.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = "basis-processing"
3
- s.version = "0.4.4"
3
+ s.version = "0.4.5"
4
4
  s.author = "Avishek Sen Gupta"
5
5
  s.email = "avishek.sen.gupta@gmail.com"
6
6
  s.homepage = "http://avishek.net/blog"
data/lib/screen.rb CHANGED
@@ -6,10 +6,14 @@ class Screen
6
6
  @artist = artist
7
7
  end
8
8
 
9
- def plot(point, basis)
9
+ def plot(point, basis, &block)
10
10
  standard_point = basis.standard_basis(point)
11
11
  p = @transform.apply(standard_point)
12
- @artist.ellipse(p[:x], p[:y], 5, 5)
12
+ if (block)
13
+ block.call(p)
14
+ else
15
+ @artist.ellipse(p[:x], p[:y], 5, 5)
16
+ end
13
17
  end
14
18
 
15
19
  def draw_ticks(ticks, displacement)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basis-processing
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 4
10
- version: 0.4.4
9
+ - 5
10
+ version: 0.4.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Avishek Sen Gupta
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-20 00:00:00 Z
18
+ date: 2011-09-22 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Basis provides a set of classes for easily plotting and transforming arbitrary 2D coordinate systems by specifying their basis vectors in Ruby-Processing.