rays 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.doc/ext/rays/bitmap.cpp +70 -233
- data/.doc/ext/rays/bounds.cpp +339 -57
- data/.doc/ext/rays/color.cpp +58 -48
- data/.doc/ext/rays/color_space.cpp +174 -0
- data/.doc/ext/rays/font.cpp +31 -53
- data/.doc/ext/rays/image.cpp +64 -67
- data/.doc/ext/rays/matrix.cpp +22 -50
- data/.doc/ext/rays/native.cpp +9 -2
- data/.doc/ext/rays/painter.cpp +276 -259
- data/.doc/ext/rays/point.cpp +186 -52
- data/.doc/ext/rays/rays.cpp +25 -20
- data/.doc/ext/rays/shader.cpp +61 -0
- data/.doc/ext/rays/texture.cpp +47 -59
- data/{README → README.md} +0 -0
- data/Rakefile +6 -5
- data/VERSION +1 -1
- data/ext/rays/bitmap.cpp +88 -248
- data/ext/rays/bounds.cpp +437 -141
- data/ext/rays/color.cpp +79 -69
- data/ext/rays/color_space.cpp +185 -0
- data/ext/rays/extconf.rb +14 -63
- data/ext/rays/font.cpp +44 -65
- data/ext/rays/image.cpp +82 -81
- data/ext/rays/matrix.cpp +32 -60
- data/ext/rays/native.cpp +9 -2
- data/ext/rays/painter.cpp +345 -321
- data/ext/rays/point.cpp +212 -69
- data/ext/rays/rays.cpp +29 -23
- data/ext/rays/shader.cpp +63 -0
- data/ext/rays/texture.cpp +64 -74
- data/include/rays/bitmap.h +21 -12
- data/include/rays/bounds.h +67 -9
- data/include/rays/color.h +23 -7
- data/include/rays/{colorspace.h → color_space.h} +6 -3
- data/include/rays/exception.h +17 -11
- data/include/rays/font.h +4 -3
- data/include/rays/image.h +11 -6
- data/include/rays/matrix.h +15 -12
- data/include/rays/opengl.h +54 -1
- data/include/rays/painter.h +98 -108
- data/include/rays/point.h +45 -5
- data/include/rays/rays.h +2 -2
- data/include/rays/ruby/bitmap.h +2 -16
- data/include/rays/ruby/bounds.h +4 -16
- data/include/rays/ruby/color.h +3 -16
- data/include/rays/ruby/color_space.h +27 -0
- data/include/rays/ruby/font.h +2 -16
- data/include/rays/ruby/image.h +2 -16
- data/include/rays/ruby/matrix.h +2 -16
- data/include/rays/ruby/painter.h +2 -16
- data/include/rays/ruby/point.h +3 -16
- data/include/rays/ruby/shader.h +27 -0
- data/include/rays/ruby/texture.h +2 -16
- data/include/rays/ruby.h +1 -0
- data/include/rays/shader.h +48 -0
- data/include/rays/texture.h +13 -2
- data/include/rays.h +2 -1
- data/lib/rays/bitmap.rb +20 -11
- data/lib/rays/bounds.rb +29 -68
- data/lib/rays/color.rb +39 -0
- data/lib/rays/color_space.rb +33 -0
- data/lib/rays/font.rb +29 -0
- data/lib/rays/image.rb +22 -0
- data/lib/rays/module.rb +11 -7
- data/lib/rays/painter.rb +103 -40
- data/lib/rays/point.rb +19 -36
- data/lib/rays/shader.rb +13 -0
- data/lib/rays/texture.rb +9 -0
- data/lib/rays.rb +4 -0
- data/rays.gemspec +3 -4
- data/src/bounds.cpp +272 -63
- data/src/color.cpp +168 -21
- data/src/{colorspace.cpp → color_space.cpp} +38 -1
- data/src/exception.cpp +24 -15
- data/src/frame_buffer.cpp +275 -0
- data/src/frame_buffer.h +79 -0
- data/src/image.cpp +80 -36
- data/src/ios/bitmap.mm +340 -0
- data/src/ios/font.mm +206 -0
- data/src/{cocoa → ios}/helper.h +2 -2
- data/src/{cocoa → ios}/helper.mm +0 -0
- data/src/ios/opengl.mm +21 -0
- data/src/ios/program.cpp +122 -0
- data/src/{cocoa → ios}/rays.mm +8 -7
- data/src/matrix.cpp +10 -22
- data/src/opengl.cpp +64 -0
- data/src/{cocoa → osx}/bitmap.mm +121 -70
- data/src/{cocoa → osx}/font.mm +32 -24
- data/src/osx/helper.h +26 -0
- data/src/osx/helper.mm +25 -0
- data/src/osx/opengl.mm +103 -0
- data/src/osx/rays.mm +43 -0
- data/src/painter.cpp +596 -422
- data/src/point.cpp +154 -11
- data/src/program.cpp +513 -0
- data/src/program.h +73 -0
- data/src/render_buffer.cpp +120 -0
- data/src/render_buffer.h +47 -0
- data/src/shader.cpp +117 -0
- data/src/texture.cpp +104 -134
- data/test/helper.rb +10 -3
- data/test/test_bitmap.rb +18 -0
- data/test/test_bounds.rb +81 -35
- data/test/test_color.rb +29 -2
- data/test/test_image.rb +63 -0
- data/test/test_painter.rb +120 -0
- data/test/test_point.rb +30 -9
- data/test/test_shader.rb +37 -0
- data/test/test_texture.rb +18 -0
- metadata +75 -58
- data/.gitignore +0 -14
- data/ChangeLog +0 -8
data/include/rays/painter.h
CHANGED
@@ -6,7 +6,6 @@
|
|
6
6
|
|
7
7
|
#include <xot/pimpl.h>
|
8
8
|
#include <rays/defs.h>
|
9
|
-
#include <rays/texture.h>
|
10
9
|
#include <rays/opengl.h>
|
11
10
|
|
12
11
|
|
@@ -14,46 +13,22 @@ namespace Rays
|
|
14
13
|
{
|
15
14
|
|
16
15
|
|
17
|
-
|
18
|
-
{
|
19
|
-
|
20
|
-
SHAPE_UNKNOWN = Xot::UNKNOWN,
|
21
|
-
|
22
|
-
POINTS = GL_POINTS,
|
23
|
-
|
24
|
-
LINES = GL_LINES,
|
25
|
-
|
26
|
-
LINE_STRIP = GL_LINE_STRIP,
|
27
|
-
|
28
|
-
LINE_LOOP = GL_LINE_LOOP,
|
29
|
-
|
30
|
-
TRIANGLES = GL_TRIANGLES,
|
31
|
-
|
32
|
-
TRIANGLE_STRIP = GL_TRIANGLE_STRIP,
|
33
|
-
|
34
|
-
TRIANGLE_FAN = GL_TRIANGLE_FAN,
|
35
|
-
|
36
|
-
QUADS = GL_QUADS,
|
16
|
+
struct Point;
|
37
17
|
|
38
|
-
|
18
|
+
struct Bounds;
|
39
19
|
|
40
|
-
|
20
|
+
struct Color;
|
41
21
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
class Point;
|
46
|
-
|
47
|
-
class Bounds;
|
48
|
-
|
49
|
-
class Color;
|
50
|
-
|
51
|
-
class Matrix;
|
22
|
+
struct Matrix;
|
52
23
|
|
53
24
|
class Font;
|
54
25
|
|
55
26
|
class Image;
|
56
27
|
|
28
|
+
class Texture;
|
29
|
+
|
30
|
+
class Shader;
|
31
|
+
|
57
32
|
|
58
33
|
class Painter
|
59
34
|
{
|
@@ -64,201 +39,216 @@ namespace Rays
|
|
64
39
|
|
65
40
|
~Painter ();
|
66
41
|
|
67
|
-
|
42
|
+
void canvas (coord x, coord y, coord width, coord height);
|
43
|
+
|
44
|
+
void canvas (coord x, coord y, coord z, coord width, coord height, coord depth);
|
68
45
|
|
69
|
-
|
46
|
+
void canvas (const Bounds& bounds);
|
70
47
|
|
71
|
-
|
48
|
+
void bind (const Texture& texture);
|
72
49
|
|
73
|
-
|
50
|
+
void unbind ();
|
74
51
|
|
75
|
-
|
52
|
+
const Bounds& bounds () const;
|
76
53
|
|
77
54
|
//
|
78
55
|
// high level drawing methods
|
79
56
|
//
|
80
|
-
|
57
|
+
void begin ();
|
58
|
+
|
59
|
+
void end ();
|
60
|
+
|
61
|
+
void clear ();
|
81
62
|
|
82
|
-
|
63
|
+
void line (coord x1, coord y1, coord x2, coord y2);
|
83
64
|
|
84
|
-
|
65
|
+
void line (const Point& p1, const Point& p2);
|
85
66
|
|
86
|
-
|
67
|
+
void rect (coord x, coord y, coord width, coord height);
|
87
68
|
|
88
|
-
|
69
|
+
void rect (const Bounds& bounds);
|
70
|
+
|
71
|
+
void ellipse (
|
89
72
|
coord x, coord y, coord width, coord height = 0,
|
90
73
|
coord radius_min = 0, uint nsegment = 0);
|
91
74
|
|
92
|
-
|
75
|
+
void ellipse (
|
93
76
|
const Bounds& bounds,
|
94
77
|
coord radius_min = 0, uint nsegment = 0);
|
95
78
|
|
96
|
-
|
79
|
+
void ellipse (
|
97
80
|
const Point& center, coord radius,
|
98
81
|
coord radius_min = 0, uint nsegment = 0);
|
99
82
|
|
100
|
-
|
83
|
+
void arc (
|
101
84
|
coord x, coord y, coord width, coord height = 0,
|
102
85
|
float angle_from = 0, float angle_to = 360,
|
103
86
|
coord radius_min = 0, uint nsegment = 0);
|
104
87
|
|
105
|
-
|
88
|
+
void arc (
|
106
89
|
const Bounds& bounds,
|
107
90
|
float angle_from = 0, float angle_to = 360,
|
108
91
|
coord radius_min = 0, uint nsegment = 0);
|
109
92
|
|
110
|
-
|
93
|
+
void arc (
|
111
94
|
const Point& center, coord radius,
|
112
95
|
float angle_from = 0, float angle_to = 360,
|
113
96
|
coord radius_min = 0, uint nsegment = 0);
|
114
97
|
|
115
|
-
|
98
|
+
void image (
|
116
99
|
const Image& image, coord x = 0, coord y = 0);
|
117
100
|
|
118
|
-
|
101
|
+
void image (
|
119
102
|
const Image& image, const Point& position);
|
120
103
|
|
121
|
-
|
104
|
+
void image (
|
122
105
|
const Image& image, coord x, coord y, coord width, coord height);
|
123
106
|
|
124
|
-
|
107
|
+
void image (
|
125
108
|
const Image& image, const Bounds& bounds);
|
126
109
|
|
127
|
-
|
110
|
+
void image (
|
128
111
|
const Image& image,
|
129
112
|
coord src_x, coord src_y, coord src_width, coord src_height,
|
130
113
|
coord dest_x, coord dest_y);
|
131
114
|
|
132
|
-
|
115
|
+
void image (
|
133
116
|
const Image& image,
|
134
117
|
const Bounds& src_bounds, const Point& dest_position);
|
135
118
|
|
136
|
-
|
119
|
+
void image (
|
137
120
|
const Image& image,
|
138
121
|
coord src_x, coord src_y, coord src_width, coord src_height,
|
139
122
|
coord dest_x, coord dest_y, coord dest_width, coord dest_height);
|
140
123
|
|
141
|
-
|
124
|
+
void image (
|
142
125
|
const Image& image,
|
143
126
|
const Bounds& src_bounds, const Bounds& dest_bounds);
|
144
127
|
|
145
|
-
|
128
|
+
void text (
|
146
129
|
const char* str, coord x = 0, coord y = 0,
|
147
130
|
const Font* font = NULL);
|
148
131
|
|
149
|
-
|
132
|
+
void text (
|
150
133
|
const char* str, const Point& position,
|
151
134
|
const Font* font = NULL);
|
152
135
|
|
153
|
-
|
136
|
+
void text (
|
154
137
|
const char* str, coord x, coord y, coord width, coord height,
|
155
138
|
const Font* font = NULL);
|
156
139
|
|
157
|
-
|
140
|
+
void text (
|
158
141
|
const char* str, const Bounds& bounds,
|
159
142
|
const Font* font = NULL);
|
160
143
|
|
161
|
-
|
162
|
-
|
163
|
-
|
144
|
+
//
|
145
|
+
// attributes
|
146
|
+
//
|
147
|
+
void set_background (float red, float green, float blue, float alpha = 1, bool clear = true);
|
164
148
|
|
165
|
-
|
149
|
+
void set_background (const Color& color, bool clear = true);
|
166
150
|
|
167
|
-
|
151
|
+
void no_background (bool clear = true);
|
168
152
|
|
169
153
|
const Color& background () const;
|
170
154
|
|
171
|
-
|
155
|
+
void set_fill (float red, float green, float blue, float alpha = 1);
|
172
156
|
|
173
|
-
|
157
|
+
void set_fill (const Color& color);
|
174
158
|
|
175
|
-
|
159
|
+
void no_fill ();
|
176
160
|
|
177
161
|
const Color& fill () const;
|
178
162
|
|
179
|
-
|
163
|
+
void set_stroke (float red, float green, float blue, float alpha = 1);
|
180
164
|
|
181
|
-
|
165
|
+
void set_stroke (const Color& color);
|
182
166
|
|
183
|
-
|
167
|
+
void no_stroke ();
|
184
168
|
|
185
169
|
const Color& stroke () const;
|
186
170
|
|
187
|
-
|
171
|
+
void set_clip (coord x, coord y, coord width, coord height);
|
188
172
|
|
189
|
-
|
173
|
+
void set_clip (const Bounds& bounds);
|
190
174
|
|
191
|
-
|
175
|
+
void no_clip ();
|
192
176
|
|
193
177
|
const Bounds& clip () const;
|
194
178
|
|
195
|
-
|
179
|
+
void set_font (const char* name, coord size = 0);
|
180
|
+
|
181
|
+
void set_font (const Font& font);
|
196
182
|
|
197
183
|
const Font& font () const;
|
198
184
|
|
199
|
-
|
185
|
+
void push_attr ();
|
200
186
|
|
201
|
-
|
187
|
+
void pop_attr ();
|
202
188
|
|
203
189
|
//
|
204
|
-
//
|
190
|
+
// shader manipulation methods
|
205
191
|
//
|
206
|
-
|
192
|
+
void attach (const Shader& shader);
|
207
193
|
|
208
|
-
|
194
|
+
void detach (const Shader& shader);
|
209
195
|
|
210
|
-
|
196
|
+
void set_uniform (const char* name, int arg1);
|
211
197
|
|
212
|
-
|
198
|
+
void set_uniform (const char* name, int arg1, int arg2);
|
213
199
|
|
214
|
-
|
200
|
+
void set_uniform (const char* name, int arg1, int arg2, int arg3);
|
215
201
|
|
216
|
-
|
202
|
+
void set_uniform (const char* name, int arg1, int arg2, int arg3, int arg4);
|
217
203
|
|
218
|
-
|
204
|
+
void set_uniform (const char* name, const int* args, size_t size);
|
219
205
|
|
220
|
-
|
221
|
-
float a1, float a2, float a3, float a4,
|
222
|
-
float b1, float b2, float b3, float b4,
|
223
|
-
float c1, float c2, float c3, float c4,
|
224
|
-
float d1, float d2, float d3, float d4);
|
206
|
+
void set_uniform (const char* name, float arg1);
|
225
207
|
|
226
|
-
|
208
|
+
void set_uniform (const char* name, float arg1, float arg2);
|
227
209
|
|
228
|
-
|
210
|
+
void set_uniform (const char* name, float arg1, float arg2, float arg3);
|
229
211
|
|
230
|
-
const
|
212
|
+
void set_uniform (const char* name, float arg1, float arg2, float arg3, float arg4);
|
213
|
+
|
214
|
+
void set_uniform (const char* name, const float* args, size_t size);
|
231
215
|
|
232
|
-
|
216
|
+
void push_shader ();
|
233
217
|
|
234
|
-
|
218
|
+
void pop_shader ();
|
235
219
|
|
236
220
|
//
|
237
|
-
//
|
221
|
+
// transformation methods
|
238
222
|
//
|
239
|
-
|
223
|
+
void translate (coord x, coord y, coord z = 0);
|
240
224
|
|
241
|
-
|
225
|
+
void translate (const Point& value);
|
242
226
|
|
243
|
-
|
227
|
+
void scale (coord x, coord y, coord z = 1);
|
244
228
|
|
245
|
-
|
229
|
+
void scale (const Point& value);
|
246
230
|
|
247
|
-
|
231
|
+
void rotate (float angle, coord x = 0, coord y = 0, coord z = 1);
|
248
232
|
|
249
|
-
|
233
|
+
void rotate (float angle, const Point& center);
|
250
234
|
|
251
|
-
|
235
|
+
void set_matrix (float value = 1);
|
252
236
|
|
253
|
-
|
237
|
+
void set_matrix (
|
238
|
+
float a1, float a2, float a3, float a4,
|
239
|
+
float b1, float b2, float b3, float b4,
|
240
|
+
float c1, float c2, float c3, float c4,
|
241
|
+
float d1, float d2, float d3, float d4);
|
254
242
|
|
255
|
-
|
243
|
+
void set_matrix (const float* elements);
|
256
244
|
|
257
|
-
|
245
|
+
void set_matrix (const Matrix& matrix);
|
246
|
+
|
247
|
+
const Matrix& matrix () const;
|
258
248
|
|
259
|
-
|
249
|
+
void push_matrix ();
|
260
250
|
|
261
|
-
|
251
|
+
void pop_matrix ();
|
262
252
|
|
263
253
|
|
264
254
|
operator bool () const;
|
data/include/rays/point.h
CHANGED
@@ -14,7 +14,11 @@ namespace Rays
|
|
14
14
|
struct Point
|
15
15
|
{
|
16
16
|
|
17
|
-
|
17
|
+
union
|
18
|
+
{
|
19
|
+
struct {coord x, y, z;};
|
20
|
+
coord array[3];
|
21
|
+
};
|
18
22
|
|
19
23
|
Point (coord value = 0);
|
20
24
|
|
@@ -22,13 +26,49 @@ namespace Rays
|
|
22
26
|
|
23
27
|
Point dup () const;
|
24
28
|
|
25
|
-
Point&
|
29
|
+
Point& reset (coord value = 0);
|
26
30
|
|
27
|
-
Point&
|
31
|
+
Point& reset (coord x, coord y, coord z = 0);
|
28
32
|
|
29
|
-
|
33
|
+
Point& move_to (coord x, coord y, coord z = 0);
|
30
34
|
|
31
|
-
const
|
35
|
+
Point& move_to (const Point& point);
|
36
|
+
|
37
|
+
Point& move_by (coord x, coord y, coord z = 0);
|
38
|
+
|
39
|
+
Point& move_by (const Point& point);
|
40
|
+
|
41
|
+
String inspect () const;
|
42
|
+
|
43
|
+
coord& operator [] (size_t index);
|
44
|
+
|
45
|
+
const coord& operator [] (size_t index) const;
|
46
|
+
|
47
|
+
Point operator - () const;
|
48
|
+
|
49
|
+
Point& operator += (const Point& rhs);
|
50
|
+
|
51
|
+
Point& operator -= (const Point& rhs);
|
52
|
+
|
53
|
+
Point& operator *= (const Point& rhs);
|
54
|
+
|
55
|
+
Point& operator /= (const Point& rhs);
|
56
|
+
|
57
|
+
Point& operator /= (coord rhs);
|
58
|
+
|
59
|
+
friend bool operator == (const Point& lhs, const Point& rhs);
|
60
|
+
|
61
|
+
friend bool operator != (const Point& lhs, const Point& rhs);
|
62
|
+
|
63
|
+
friend Point operator + (const Point& lhs, const Point& rhs);
|
64
|
+
|
65
|
+
friend Point operator - (const Point& lhs, const Point& rhs);
|
66
|
+
|
67
|
+
friend Point operator * (const Point& lhs, const Point& rhs);
|
68
|
+
|
69
|
+
friend Point operator / (const Point& lhs, const Point& rhs);
|
70
|
+
|
71
|
+
friend Point operator / (const Point& lhs, coord rhs);
|
32
72
|
|
33
73
|
};// Point
|
34
74
|
|
data/include/rays/rays.h
CHANGED
data/include/rays/ruby/bitmap.h
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
#include <rucy/rucy.h>
|
8
8
|
#include <rucy/class.h>
|
9
|
+
#include <rucy/extension.h>
|
9
10
|
#include <rays/bitmap.h>
|
10
11
|
|
11
12
|
|
@@ -20,22 +21,7 @@ namespace Rays
|
|
20
21
|
}// Rays
|
21
22
|
|
22
23
|
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
27
|
-
Value value (const Rays::Bitmap& obj);
|
28
|
-
|
29
|
-
Value value (const Rays::Bitmap* obj);
|
30
|
-
|
31
|
-
template <> inline Rays::Bitmap*
|
32
|
-
value_to<Rays::Bitmap*> (Value val, bool)
|
33
|
-
{
|
34
|
-
return get_type_ptr<Rays::Bitmap>(val, Rays::bitmap_class());
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
}// Rucy
|
24
|
+
RUCY_DECLARE_VALUE_FROM_TO(Rays::Bitmap)
|
39
25
|
|
40
26
|
|
41
27
|
#endif//EOH
|
data/include/rays/ruby/bounds.h
CHANGED
@@ -6,7 +6,10 @@
|
|
6
6
|
|
7
7
|
#include <rucy/rucy.h>
|
8
8
|
#include <rucy/class.h>
|
9
|
+
#include <rucy/extension.h>
|
10
|
+
#include <rucy/exception.h>
|
9
11
|
#include <rays/bounds.h>
|
12
|
+
#include <rays/ruby/point.h>
|
10
13
|
|
11
14
|
|
12
15
|
namespace Rays
|
@@ -20,22 +23,7 @@ namespace Rays
|
|
20
23
|
}// Rays
|
21
24
|
|
22
25
|
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
27
|
-
Value value (const Rays::Bounds& obj);
|
28
|
-
|
29
|
-
Value value (const Rays::Bounds* obj);
|
30
|
-
|
31
|
-
template <> inline Rays::Bounds*
|
32
|
-
value_to<Rays::Bounds*> (Value val, bool)
|
33
|
-
{
|
34
|
-
return get_type_ptr<Rays::Bounds>(val, Rays::bounds_class());
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
}// Rucy
|
26
|
+
RUCY_DECLARE_VALUE_FROM_TO(Rays::Bounds)
|
39
27
|
|
40
28
|
|
41
29
|
#endif//EOH
|
data/include/rays/ruby/color.h
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
#include <rucy/rucy.h>
|
8
8
|
#include <rucy/class.h>
|
9
|
+
#include <rucy/extension.h>
|
10
|
+
#include <rucy/exception.h>
|
9
11
|
#include <rays/color.h>
|
10
12
|
|
11
13
|
|
@@ -20,22 +22,7 @@ namespace Rays
|
|
20
22
|
}// Rays
|
21
23
|
|
22
24
|
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
27
|
-
Value value (const Rays::Color& obj);
|
28
|
-
|
29
|
-
Value value (const Rays::Color* obj);
|
30
|
-
|
31
|
-
template <> inline Rays::Color*
|
32
|
-
value_to<Rays::Color*> (Value val, bool)
|
33
|
-
{
|
34
|
-
return get_type_ptr<Rays::Color>(val, Rays::color_class());
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
}// Rucy
|
25
|
+
RUCY_DECLARE_VALUE_FROM_TO(Rays::Color)
|
39
26
|
|
40
27
|
|
41
28
|
#endif//EOH
|
@@ -0,0 +1,27 @@
|
|
1
|
+
// -*- c++ -*-
|
2
|
+
#pragma once
|
3
|
+
#ifndef __RAYS_RUBY_COLOR_SPACE_H__
|
4
|
+
#define __RAYS_RUBY_COLOR_SPACE_H__
|
5
|
+
|
6
|
+
|
7
|
+
#include <rucy/rucy.h>
|
8
|
+
#include <rucy/class.h>
|
9
|
+
#include <rucy/extension.h>
|
10
|
+
#include <rays/color_space.h>
|
11
|
+
|
12
|
+
|
13
|
+
namespace Rays
|
14
|
+
{
|
15
|
+
|
16
|
+
|
17
|
+
Rucy::Class color_space_class ();
|
18
|
+
// class Rays::ColorSpace
|
19
|
+
|
20
|
+
|
21
|
+
}// Rays
|
22
|
+
|
23
|
+
|
24
|
+
RUCY_DECLARE_VALUE_FROM_TO(Rays::ColorSpace)
|
25
|
+
|
26
|
+
|
27
|
+
#endif//EOH
|
data/include/rays/ruby/font.h
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
#include <rucy/rucy.h>
|
8
8
|
#include <rucy/class.h>
|
9
|
+
#include <rucy/extension.h>
|
9
10
|
#include <rays/font.h>
|
10
11
|
|
11
12
|
|
@@ -20,22 +21,7 @@ namespace Rays
|
|
20
21
|
}// Rays
|
21
22
|
|
22
23
|
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
27
|
-
Value value (const Rays::Font& obj);
|
28
|
-
|
29
|
-
Value value (const Rays::Font* obj);
|
30
|
-
|
31
|
-
template <> inline Rays::Font*
|
32
|
-
value_to<Rays::Font*> (Value val, bool)
|
33
|
-
{
|
34
|
-
return get_type_ptr<Rays::Font>(val, Rays::font_class());
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
}// Rucy
|
24
|
+
RUCY_DECLARE_VALUE_FROM_TO(Rays::Font)
|
39
25
|
|
40
26
|
|
41
27
|
#endif//EOH
|
data/include/rays/ruby/image.h
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
#include <rucy/rucy.h>
|
8
8
|
#include <rucy/class.h>
|
9
|
+
#include <rucy/extension.h>
|
9
10
|
#include <rays/image.h>
|
10
11
|
|
11
12
|
|
@@ -20,22 +21,7 @@ namespace Rays
|
|
20
21
|
}// Rays
|
21
22
|
|
22
23
|
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
27
|
-
Value value (const Rays::Image& obj);
|
28
|
-
|
29
|
-
Value value (const Rays::Image* obj);
|
30
|
-
|
31
|
-
template <> inline Rays::Image*
|
32
|
-
value_to<Rays::Image*> (Value val, bool)
|
33
|
-
{
|
34
|
-
return get_type_ptr<Rays::Image>(val, Rays::image_class());
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
}// Rucy
|
24
|
+
RUCY_DECLARE_VALUE_FROM_TO(Rays::Image)
|
39
25
|
|
40
26
|
|
41
27
|
#endif//EOH
|
data/include/rays/ruby/matrix.h
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
#include <rucy/rucy.h>
|
8
8
|
#include <rucy/class.h>
|
9
|
+
#include <rucy/extension.h>
|
9
10
|
#include <rays/matrix.h>
|
10
11
|
|
11
12
|
|
@@ -20,22 +21,7 @@ namespace Rays
|
|
20
21
|
}// Rays
|
21
22
|
|
22
23
|
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
27
|
-
Value value (const Rays::Matrix& obj);
|
28
|
-
|
29
|
-
Value value (const Rays::Matrix* obj);
|
30
|
-
|
31
|
-
template <> inline Rays::Matrix*
|
32
|
-
value_to<Rays::Matrix*> (Value val, bool)
|
33
|
-
{
|
34
|
-
return get_type_ptr<Rays::Matrix>(val, Rays::matrix_class());
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
}// Rucy
|
24
|
+
RUCY_DECLARE_VALUE_FROM_TO(Rays::Matrix)
|
39
25
|
|
40
26
|
|
41
27
|
#endif//EOH
|
data/include/rays/ruby/painter.h
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
#include <rucy/rucy.h>
|
8
8
|
#include <rucy/class.h>
|
9
|
+
#include <rucy/extension.h>
|
9
10
|
#include <rays/painter.h>
|
10
11
|
|
11
12
|
|
@@ -20,22 +21,7 @@ namespace Rays
|
|
20
21
|
}// Rays
|
21
22
|
|
22
23
|
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
27
|
-
Value value (const Rays::Painter& obj);
|
28
|
-
|
29
|
-
Value value (const Rays::Painter* obj);
|
30
|
-
|
31
|
-
template <> inline Rays::Painter*
|
32
|
-
value_to<Rays::Painter*> (Value val, bool)
|
33
|
-
{
|
34
|
-
return get_type_ptr<Rays::Painter>(val, Rays::painter_class());
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
}// Rucy
|
24
|
+
RUCY_DECLARE_VALUE_FROM_TO(Rays::Painter)
|
39
25
|
|
40
26
|
|
41
27
|
#endif//EOH
|