reflexion 0.1.35 → 0.1.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.doc/ext/reflex/view.cpp +17 -0
  3. data/ChangeLog.md +10 -0
  4. data/Rakefile +1 -1
  5. data/VERSION +1 -1
  6. data/ext/reflex/extconf.rb +0 -3
  7. data/ext/reflex/view.cpp +19 -0
  8. data/include/reflex/event.h +1 -1
  9. data/include/reflex/view.h +6 -0
  10. data/lib/reflex/application.rb +2 -3
  11. data/lib/reflex/autoinit.rb +0 -3
  12. data/lib/reflex/bitmap.rb +0 -3
  13. data/lib/reflex/bounds.rb +0 -3
  14. data/lib/reflex/button.rb +0 -3
  15. data/lib/reflex/camera.rb +0 -3
  16. data/lib/reflex/capture_event.rb +0 -3
  17. data/lib/reflex/color.rb +0 -3
  18. data/lib/reflex/color_space.rb +0 -3
  19. data/lib/reflex/contact_event.rb +0 -3
  20. data/lib/reflex/draw_event.rb +0 -3
  21. data/lib/reflex/ellipse_shape.rb +0 -3
  22. data/lib/reflex/ext.rb +0 -3
  23. data/lib/reflex/extension.rb +0 -3
  24. data/lib/reflex/filter.rb +0 -3
  25. data/lib/reflex/fixture.rb +0 -3
  26. data/lib/reflex/focus_event.rb +0 -3
  27. data/lib/reflex/font.rb +0 -3
  28. data/lib/reflex/frame_event.rb +0 -3
  29. data/lib/reflex/helper.rb +0 -3
  30. data/lib/reflex/image.rb +0 -3
  31. data/lib/reflex/image_view.rb +0 -3
  32. data/lib/reflex/key_event.rb +0 -3
  33. data/lib/reflex/line_shape.rb +0 -3
  34. data/lib/reflex/list_view.rb +0 -3
  35. data/lib/reflex/matrix.rb +0 -3
  36. data/lib/reflex/model.rb +0 -3
  37. data/lib/reflex/model_owner.rb +0 -3
  38. data/lib/reflex/model_view.rb +0 -3
  39. data/lib/reflex/painter.rb +0 -3
  40. data/lib/reflex/point.rb +0 -3
  41. data/lib/reflex/pointer.rb +0 -3
  42. data/lib/reflex/pointer_event.rb +0 -3
  43. data/lib/reflex/polygon.rb +0 -3
  44. data/lib/reflex/polygon_shape.rb +0 -3
  45. data/lib/reflex/polyline.rb +0 -3
  46. data/lib/reflex/rect_shape.rb +0 -3
  47. data/lib/reflex/reflex.rb +0 -3
  48. data/lib/reflex/scroll_event.rb +0 -3
  49. data/lib/reflex/selector.rb +0 -3
  50. data/lib/reflex/shader.rb +0 -3
  51. data/lib/reflex/shape.rb +0 -3
  52. data/lib/reflex/style.rb +0 -3
  53. data/lib/reflex/style_length.rb +0 -3
  54. data/lib/reflex/text_view.rb +0 -3
  55. data/lib/reflex/timer.rb +0 -3
  56. data/lib/reflex/timer_event.rb +0 -3
  57. data/lib/reflex/update_event.rb +0 -3
  58. data/lib/reflex/view.rb +10 -4
  59. data/lib/reflex/wheel_event.rb +0 -3
  60. data/lib/reflex/window.rb +2 -3
  61. data/lib/reflex.rb +0 -3
  62. data/lib/reflexion/include.rb +0 -3
  63. data/lib/reflexion.rb +0 -3
  64. data/reflex.gemspec +5 -5
  65. data/samples/app.rb +0 -3
  66. data/samples/bats.rb +0 -3
  67. data/samples/camera.rb +0 -3
  68. data/samples/checker.rb +0 -3
  69. data/samples/fans.rb +0 -3
  70. data/samples/fps.rb +0 -3
  71. data/samples/grid.rb +0 -3
  72. data/samples/hello.rb +0 -3
  73. data/samples/image.rb +0 -3
  74. data/samples/key.rb +0 -3
  75. data/samples/layout.rb +0 -3
  76. data/samples/model.rb +0 -3
  77. data/samples/physics.rb +0 -3
  78. data/samples/reflexion/breakout.rb +0 -3
  79. data/samples/reflexion/hello.rb +0 -3
  80. data/samples/reflexion/jump_action.rb +0 -3
  81. data/samples/reflexion/noise.rb +0 -3
  82. data/samples/reflexion/paint.rb +0 -3
  83. data/samples/reflexion/physics.rb +0 -3
  84. data/samples/reflexion/pulse.rb +0 -3
  85. data/samples/repl.rb +0 -3
  86. data/samples/shader.rb +0 -3
  87. data/samples/shapes.rb +0 -3
  88. data/samples/text.rb +0 -3
  89. data/samples/tree.rb +0 -3
  90. data/samples/views.rb +0 -3
  91. data/samples/visuals.rb +0 -3
  92. data/src/body.cpp +14 -0
  93. data/src/body.h +4 -0
  94. data/src/event.cpp +27 -28
  95. data/src/view.cpp +89 -14
  96. data/src/window.cpp +4 -2
  97. data/test/helper.rb +0 -3
  98. data/test/test_application.rb +4 -3
  99. data/test/test_capture_event.rb +0 -3
  100. data/test/test_contact_event.rb +0 -3
  101. data/test/test_draw_event.rb +0 -3
  102. data/test/test_event.rb +1 -4
  103. data/test/test_focus_event.rb +0 -3
  104. data/test/test_frame_event.rb +0 -3
  105. data/test/test_has_frame.rb +0 -3
  106. data/test/test_key_event.rb +0 -3
  107. data/test/test_model.rb +0 -3
  108. data/test/test_model_owner.rb +0 -3
  109. data/test/test_pointer.rb +0 -3
  110. data/test/test_pointer_event.rb +0 -3
  111. data/test/test_reflex_init.rb +0 -3
  112. data/test/test_scroll_event.rb +0 -3
  113. data/test/test_selector.rb +0 -3
  114. data/test/test_shape.rb +0 -3
  115. data/test/test_style.rb +0 -3
  116. data/test/test_style_length.rb +0 -3
  117. data/test/test_timer_event.rb +0 -3
  118. data/test/test_update_event.rb +0 -3
  119. data/test/test_view.rb +37 -3
  120. data/test/test_wheel_event.rb +0 -3
  121. data/test/test_window.rb +4 -3
  122. metadata +10 -10
data/test/test_pointer.rb CHANGED
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  $RAYS_NOAUTOINIT = true
5
2
  $REFLEX_NOAUTOINIT = true
6
3
 
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
data/test/test_shape.rb CHANGED
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
data/test/test_style.rb CHANGED
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
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
@@ -1,6 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
-
3
-
4
1
  require_relative 'helper'
5
2
 
6
3
 
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.35
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-04-30 00:00:00.000000000 Z
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.34
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.34
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.34
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.34
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.35
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.35
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.34
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.34
68
+ version: 0.1.35
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement