hornetseye-frame 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'rbconfig'
8
8
  require 'tempfile'
9
9
 
10
10
  PKG_NAME = 'hornetseye-frame'
11
- PKG_VERSION = '0.5.1'
11
+ PKG_VERSION = '0.6.0'
12
12
  CXX = ENV[ 'CXX' ] || 'g++'
13
13
  STRIP = ENV[ 'STRIP' ] || 'strip'
14
14
  RB_FILES = FileList[ 'lib/**/*.rb' ]
data/ext/frame.cc CHANGED
@@ -60,6 +60,11 @@ char *Frame::data(void)
60
60
  return ptr;
61
61
  }
62
62
 
63
+ bool Frame::rgb(void)
64
+ {
65
+ return rb_funcall( m_frame, rb_intern( "rgb?" ), 0 ) != Qfalse;
66
+ }
67
+
63
68
  void Frame::markRubyMember(void)
64
69
  {
65
70
  rb_gc_mark( m_frame );
data/ext/frame.hh CHANGED
@@ -30,6 +30,7 @@ public:
30
30
  int width(void);
31
31
  int height(void);
32
32
  char *data(void);
33
+ bool rgb(void);
33
34
  VALUE rubyObject(void) { return m_frame; }
34
35
  void markRubyMember(void);
35
36
  static int storageSize( const std::string &typecode, int width, int height );
@@ -57,6 +57,10 @@ module Hornetseye
57
57
  end
58
58
  end
59
59
 
60
+ def rgb?
61
+ true
62
+ end
63
+
60
64
  end
61
65
 
62
66
  attr_reader :memory
@@ -89,6 +93,10 @@ module Hornetseye
89
93
  self.class.storage_size
90
94
  end
91
95
 
96
+ def rgb?
97
+ self.class.rgb?
98
+ end
99
+
92
100
  alias_method :orig_to_type, :to_type
93
101
 
94
102
  def to_type( target )
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 5
8
- - 1
9
- version: 0.5.1
7
+ - 6
8
+ - 0
9
+ version: 0.6.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-10-08 00:00:00 +01:00
17
+ date: 2010-10-12 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency