graster 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +0 -4
  2. data/VERSION +1 -1
  3. data/lib/graster.rb +6 -5
  4. metadata +2 -2
data/Rakefile CHANGED
@@ -11,10 +11,6 @@ begin
11
11
  s.rubyforge_project = 'graster'
12
12
  end
13
13
  Jeweler::GemcutterTasks.new
14
- Jeweler::RubyforgeTasks.new do |rubyforge|
15
- rubyforge.doc_task = "rdoc"
16
- rubyforge.remote_doc_path = ''
17
- end
18
14
  rescue LoadError
19
15
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
20
16
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -161,8 +161,8 @@ class Graster
161
161
  end
162
162
  end
163
163
  else
164
- @config[:repeat][0].times.reverse_each do |tile|
165
- spans.reverse_each do |span|
164
+ (0...@config[:repeat][0]).to_a.reverse.each do |tile|
165
+ spans.reverse.each do |span|
166
166
  tiled_spans << [x_inches(tile,span[1]), x_inches(tile,span[0])]
167
167
  end
168
168
  end
@@ -174,8 +174,7 @@ class Graster
174
174
  def build_tiled_rows
175
175
  forward = false
176
176
  @tiled_rows = []
177
- @tiled_rows = @image.size[1].times {|y| @tiled_rows << tiled_row_spans(y, (forward = !forward)) }
178
- @tiled_rows
177
+ @image.size[1].times {|y| @tiled_rows << tiled_row_spans(y, (forward = !forward)) }
179
178
  end
180
179
 
181
180
  # generate a unique id for this job
@@ -197,7 +196,8 @@ class Graster
197
196
 
198
197
  @config[:repeat][1].times do |ytile|
199
198
  debug "begin tile row #{ytile}"
200
- @tiled_rows.each_with_index do |spans, ypix|
199
+ ypix = 0
200
+ (0...@tiled_rows).each do |spans|
201
201
  debug "pixel row #{ypix} is empty" if spans.empty?
202
202
  unless spans.empty?
203
203
  yinches = y_inches(ytile, ypix)
@@ -211,6 +211,7 @@ class Graster
211
211
  gmask.begin_row forward
212
212
  spans.each {|span| gmask.span forward, span[0]+hyst, span[1]+hyst }
213
213
  end # unless spans.empty?
214
+ ypix += 1
214
215
  end # @image.each_row
215
216
  debug "end tile row #{ytile}"
216
217
  end # @config[:repeat][i].times
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jedediah Smith
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-10-20 00:00:00 -04:00
13
+ date: 2009-12-18 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency