hornetseye-xorg 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'rake/loaders/makefile'
7
7
  require 'rbconfig'
8
8
 
9
9
  PKG_NAME = 'hornetseye-xorg'
10
- PKG_VERSION = '0.3.1'
10
+ PKG_VERSION = '0.4.0'
11
11
  CFG = RbConfig::CONFIG
12
12
  CXX = ENV[ 'CXX' ] || 'g++'
13
13
  RB_FILES = FileList[ 'lib/**/*.rb' ]
@@ -37,7 +37,7 @@ module Hornetseye
37
37
  frame, width, height = *args
38
38
  width ||= frame.width
39
39
  height ||= ( width.to_f * frame.height / frame.width ).round
40
- display = new
40
+ display = options[ :display ] || new
41
41
  output = options[ :output ].new
42
42
  output.write frame
43
43
  window = X11Window.new display, output, width, height
@@ -51,10 +51,10 @@ module Hornetseye
51
51
  frame
52
52
  else
53
53
  width, height = *args
54
- result = action.call
54
+ display = options[ :display ] || new
55
+ result = action.call display
55
56
  width ||= result.shape[0]
56
57
  height ||= ( width.to_f * result.shape[1] / result.shape[0] ).round
57
- display = new
58
58
  output = options[ :output ].new
59
59
  window = X11Window.new display, output, width, height
60
60
  window.title = options[ :title ]
@@ -71,7 +71,7 @@ module Hornetseye
71
71
  display.process_events
72
72
  end
73
73
  break unless display.status?
74
- result = action.call
74
+ result = action.call display
75
75
  end
76
76
  ensure
77
77
  window.close
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 3
8
- - 1
9
- version: 0.3.1
7
+ - 4
8
+ - 0
9
+ version: 0.4.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jan Wedekind
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-12 00:00:00 +00:00
17
+ date: 2010-11-19 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency