basis-processing 0.4.6 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/basis.gemspec +1 -1
- data/lib/screen.rb +4 -1
- metadata +4 -4
data/.gitignore
CHANGED
data/basis.gemspec
CHANGED
data/lib/screen.rb
CHANGED
@@ -6,14 +6,17 @@ class Screen
|
|
6
6
|
@artist = artist
|
7
7
|
end
|
8
8
|
|
9
|
-
def plot(point, basis, &block)
|
9
|
+
def plot(point, basis, options = {:bar => false}, &block)
|
10
10
|
standard_point = basis.standard_basis(point)
|
11
11
|
p = @transform.apply(standard_point)
|
12
|
+
|
13
|
+
standard_x_axis_point = @transform.apply(basis.standard_basis({:x => point[:x], :y => 0}))
|
12
14
|
if (block)
|
13
15
|
block.call(p)
|
14
16
|
else
|
15
17
|
@artist.ellipse(p[:x], p[:y], 5, 5)
|
16
18
|
end
|
19
|
+
@artist.line(standard_x_axis_point[:x], standard_x_axis_point[:y], p[:x], p[:y]) if options[:bar]
|
17
20
|
end
|
18
21
|
|
19
22
|
def original(onscreen_point, basis)
|
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:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 7
|
10
|
+
version: 0.4.7
|
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-
|
18
|
+
date: 2011-10-01 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.
|