reflexion 0.1.35 → 0.1.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.doc/ext/reflex/view.cpp +17 -0
- data/ChangeLog.md +10 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/ext/reflex/extconf.rb +0 -3
- data/ext/reflex/view.cpp +19 -0
- data/include/reflex/event.h +1 -1
- data/include/reflex/view.h +6 -0
- data/lib/reflex/application.rb +2 -3
- data/lib/reflex/autoinit.rb +0 -3
- data/lib/reflex/bitmap.rb +0 -3
- data/lib/reflex/bounds.rb +0 -3
- data/lib/reflex/button.rb +0 -3
- data/lib/reflex/camera.rb +0 -3
- data/lib/reflex/capture_event.rb +0 -3
- data/lib/reflex/color.rb +0 -3
- data/lib/reflex/color_space.rb +0 -3
- data/lib/reflex/contact_event.rb +0 -3
- data/lib/reflex/draw_event.rb +0 -3
- data/lib/reflex/ellipse_shape.rb +0 -3
- data/lib/reflex/ext.rb +0 -3
- data/lib/reflex/extension.rb +0 -3
- data/lib/reflex/filter.rb +0 -3
- data/lib/reflex/fixture.rb +0 -3
- data/lib/reflex/focus_event.rb +0 -3
- data/lib/reflex/font.rb +0 -3
- data/lib/reflex/frame_event.rb +0 -3
- data/lib/reflex/helper.rb +0 -3
- data/lib/reflex/image.rb +0 -3
- data/lib/reflex/image_view.rb +0 -3
- data/lib/reflex/key_event.rb +0 -3
- data/lib/reflex/line_shape.rb +0 -3
- data/lib/reflex/list_view.rb +0 -3
- data/lib/reflex/matrix.rb +0 -3
- data/lib/reflex/model.rb +0 -3
- data/lib/reflex/model_owner.rb +0 -3
- data/lib/reflex/model_view.rb +0 -3
- data/lib/reflex/painter.rb +0 -3
- data/lib/reflex/point.rb +0 -3
- data/lib/reflex/pointer.rb +0 -3
- data/lib/reflex/pointer_event.rb +0 -3
- data/lib/reflex/polygon.rb +0 -3
- data/lib/reflex/polygon_shape.rb +0 -3
- data/lib/reflex/polyline.rb +0 -3
- data/lib/reflex/rect_shape.rb +0 -3
- data/lib/reflex/reflex.rb +0 -3
- data/lib/reflex/scroll_event.rb +0 -3
- data/lib/reflex/selector.rb +0 -3
- data/lib/reflex/shader.rb +0 -3
- data/lib/reflex/shape.rb +0 -3
- data/lib/reflex/style.rb +0 -3
- data/lib/reflex/style_length.rb +0 -3
- data/lib/reflex/text_view.rb +0 -3
- data/lib/reflex/timer.rb +0 -3
- data/lib/reflex/timer_event.rb +0 -3
- data/lib/reflex/update_event.rb +0 -3
- data/lib/reflex/view.rb +10 -4
- data/lib/reflex/wheel_event.rb +0 -3
- data/lib/reflex/window.rb +2 -3
- data/lib/reflex.rb +0 -3
- data/lib/reflexion/include.rb +0 -3
- data/lib/reflexion.rb +0 -3
- data/reflex.gemspec +5 -5
- data/samples/app.rb +0 -3
- data/samples/bats.rb +0 -3
- data/samples/camera.rb +0 -3
- data/samples/checker.rb +0 -3
- data/samples/fans.rb +0 -3
- data/samples/fps.rb +0 -3
- data/samples/grid.rb +0 -3
- data/samples/hello.rb +0 -3
- data/samples/image.rb +0 -3
- data/samples/key.rb +0 -3
- data/samples/layout.rb +0 -3
- data/samples/model.rb +0 -3
- data/samples/physics.rb +0 -3
- data/samples/reflexion/breakout.rb +0 -3
- data/samples/reflexion/hello.rb +0 -3
- data/samples/reflexion/jump_action.rb +0 -3
- data/samples/reflexion/noise.rb +0 -3
- data/samples/reflexion/paint.rb +0 -3
- data/samples/reflexion/physics.rb +0 -3
- data/samples/reflexion/pulse.rb +0 -3
- data/samples/repl.rb +0 -3
- data/samples/shader.rb +0 -3
- data/samples/shapes.rb +0 -3
- data/samples/text.rb +0 -3
- data/samples/tree.rb +0 -3
- data/samples/views.rb +0 -3
- data/samples/visuals.rb +0 -3
- data/src/body.cpp +14 -0
- data/src/body.h +4 -0
- data/src/event.cpp +27 -28
- data/src/view.cpp +89 -14
- data/src/window.cpp +4 -2
- data/test/helper.rb +0 -3
- data/test/test_application.rb +4 -3
- data/test/test_capture_event.rb +0 -3
- data/test/test_contact_event.rb +0 -3
- data/test/test_draw_event.rb +0 -3
- data/test/test_event.rb +1 -4
- data/test/test_focus_event.rb +0 -3
- data/test/test_frame_event.rb +0 -3
- data/test/test_has_frame.rb +0 -3
- data/test/test_key_event.rb +0 -3
- data/test/test_model.rb +0 -3
- data/test/test_model_owner.rb +0 -3
- data/test/test_pointer.rb +0 -3
- data/test/test_pointer_event.rb +0 -3
- data/test/test_reflex_init.rb +0 -3
- data/test/test_scroll_event.rb +0 -3
- data/test/test_selector.rb +0 -3
- data/test/test_shape.rb +0 -3
- data/test/test_style.rb +0 -3
- data/test/test_style_length.rb +0 -3
- data/test/test_timer_event.rb +0 -3
- data/test/test_update_event.rb +0 -3
- data/test/test_view.rb +37 -3
- data/test/test_wheel_event.rb +0 -3
- data/test/test_window.rb +4 -3
- metadata +10 -10
data/test/test_pointer.rb
CHANGED
data/test/test_pointer_event.rb
CHANGED
data/test/test_reflex_init.rb
CHANGED
data/test/test_scroll_event.rb
CHANGED
data/test/test_selector.rb
CHANGED
data/test/test_shape.rb
CHANGED
data/test/test_style.rb
CHANGED
data/test/test_style_length.rb
CHANGED
data/test/test_timer_event.rb
CHANGED
data/test/test_update_event.rb
CHANGED
data/test/test_view.rb
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
|
3
|
-
|
4
1
|
require_relative 'helper'
|
5
2
|
|
6
3
|
|
@@ -242,6 +239,43 @@ class TestView < Test::Unit::TestCase
|
|
242
239
|
v.frame = [bounds(1, 2, 3, 4, 5, 6)]; assert_equal [1, 2, 3, 4, 5, 6], v.frame.to_a(3)
|
243
240
|
end
|
244
241
|
|
242
|
+
def test_angle()
|
243
|
+
v = view
|
244
|
+
assert_equal 0, v.angle
|
245
|
+
|
246
|
+
v.angle = 1
|
247
|
+
assert_equal 1, v.angle
|
248
|
+
|
249
|
+
v.angle = -1
|
250
|
+
assert_equal (-1), v.angle
|
251
|
+
|
252
|
+
v.angle = 359
|
253
|
+
assert_equal 359, v.angle
|
254
|
+
|
255
|
+
v.angle = 360
|
256
|
+
assert_equal 360, v.angle
|
257
|
+
|
258
|
+
v.angle = 361
|
259
|
+
assert_equal 361, v.angle
|
260
|
+
end
|
261
|
+
|
262
|
+
def test_pivot()
|
263
|
+
v = view
|
264
|
+
assert_equal point(0, 0, 0), v.pivot
|
265
|
+
|
266
|
+
v.pivot = point 0.1, 0.2
|
267
|
+
assert_equal point(0.1, 0.2, 0), v.pivot
|
268
|
+
|
269
|
+
v.pivot = point 0.4, 0.5, 0.6
|
270
|
+
assert_equal point(0.4, 0.5, 0.6), v.pivot
|
271
|
+
|
272
|
+
v.pivot = [0.7, 0.8]
|
273
|
+
assert_equal point(0.7, 0.8), v.pivot
|
274
|
+
|
275
|
+
v.pivot = [0.9, 1.0]
|
276
|
+
assert_equal point(0.9, 1.0), v.pivot
|
277
|
+
end
|
278
|
+
|
245
279
|
def test_parent()
|
246
280
|
parent, child = view, view
|
247
281
|
parent.add_child child
|
data/test/test_wheel_event.rb
CHANGED
data/test/test_window.rb
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
|
3
|
-
|
4
1
|
require_relative 'helper'
|
5
2
|
|
6
3
|
|
@@ -94,4 +91,8 @@ class TestWindow < Test::Unit::TestCase
|
|
94
91
|
assert_equal w, w.root.window
|
95
92
|
end
|
96
93
|
|
94
|
+
def test_inspect()
|
95
|
+
assert_match %r|#<Reflex::Window:0x\w{16}>|, win.inspect
|
96
|
+
end
|
97
|
+
|
97
98
|
end# TestWindow
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reflexion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xot
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.
|
19
|
+
version: 0.1.35
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.
|
26
|
+
version: 0.1.35
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rucy
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.1.
|
33
|
+
version: 0.1.35
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.1.
|
40
|
+
version: 0.1.35
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: beeps
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.36
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.
|
54
|
+
version: 0.1.36
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rays
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.1.
|
61
|
+
version: 0.1.35
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.1.
|
68
|
+
version: 0.1.35
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|