rays 0.1.42 → 0.1.44

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71f51f47f1fba7c8987c1d898e6c34ae5a1702eb39b477a316bcf0d0545d301d
4
- data.tar.gz: 93ab3dbb64858f23d726a04da0541c2ef64b889944e20085762537b61f5be8c4
3
+ metadata.gz: 16018c5d00fa4ccd0eb58ca5b3c090130d9c9c8cb1ae1a372b1ca60a1fed3360
4
+ data.tar.gz: 678d61c173b4547f6b1486501977d8e0099fde953ce1030c0bb3db9cb3062987
5
5
  SHA512:
6
- metadata.gz: afdc769d1ca50f3ce3f8918bd2643e03458d58b5893dc906cdc51c448a48787904c70ec21b3094ff04406a7a36aff8b8ed25e63e68eed8d9aa76215fda477adc
7
- data.tar.gz: a4060191a2b4f3abec170d820b0ab9bed202ad0411e3a4051c02c2cdaa537404ef33c61d47e89db387799b713dc78bd353a651f31b5b9b90bcb5d4c4ce255b2b
6
+ metadata.gz: d06d5ea0f2955016ef35d655c242879dfc7615fe0ce814871a465ebfc2ed3b0bb9be96d19bb3216d45e1218f6b7c5e3a416baaa0c6c1a1f2dd970eb9c8ed011f
7
+ data.tar.gz: b4674be3a688208f87b11a27fd129a2e3697a81d5ff7c13b4010abda3ca5e866604a15d97155bc28db291cd0f52991eff3658f24cde79b39a00ce5b727332e0e
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/bounds.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "rays/ruby/point.h"
5
6
  #include "defs.h"
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/color.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <map>
5
6
  #include "defs.h"
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/color_space.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "defs.h"
5
6
 
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/font.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "defs.h"
5
6
 
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/matrix.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "rays/ruby/point.h"
5
6
  #include "defs.h"
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/point.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "defs.h"
5
6
 
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/polygon.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <vector>
5
6
  #include <functional>
6
7
  #include "rays/ruby/bounds.h"
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/polygon.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "rays/ruby/polyline.h"
5
6
  #include "defs.h"
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/polyline.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <vector>
5
6
  #include "rays/ruby/point.h"
6
7
  #include "rays/ruby/bounds.h"
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/rays.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <vector>
5
6
  #include "defs.h"
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/shader.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "rays/ruby/image.h"
5
6
  #include "defs.h"
6
7
 
data/ChangeLog.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # rays ChangeLog
2
2
 
3
3
 
4
+ ## [v0.1.44] - 2023-10-25
5
+
6
+ - Add '#include <assert.h>' to Fix compile errors
7
+
8
+
9
+ ## [v0.1.43] - 2023-06-22
10
+
11
+ - Image.new can take pixel density with decimal point
12
+
13
+
4
14
  ## [v0.1.42] - 2023-06-11
5
15
 
6
16
  - Point#normal() checks 'length == 0' again
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.42
1
+ 0.1.44
data/ext/rays/bounds.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/bounds.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "rays/ruby/point.h"
5
6
  #include "defs.h"
6
7
 
data/ext/rays/color.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/color.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <map>
5
6
  #include "defs.h"
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/color_space.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "defs.h"
5
6
 
6
7
 
data/ext/rays/font.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/font.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "defs.h"
5
6
 
6
7
 
data/ext/rays/matrix.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/matrix.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "rays/ruby/point.h"
5
6
  #include "defs.h"
6
7
 
data/ext/rays/point.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/point.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "defs.h"
5
6
 
6
7
 
data/ext/rays/polygon.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/polygon.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <vector>
5
6
  #include <functional>
6
7
  #include "rays/ruby/bounds.h"
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/polygon.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "rays/ruby/polyline.h"
5
6
  #include "defs.h"
6
7
 
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/polyline.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <vector>
5
6
  #include "rays/ruby/point.h"
6
7
  #include "rays/ruby/bounds.h"
data/ext/rays/rays.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/rays.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <vector>
5
6
  #include "defs.h"
6
7
 
data/ext/rays/shader.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/shader.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "rays/ruby/image.h"
5
6
  #include "defs.h"
6
7
 
data/rays.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.required_ruby_version = '>= 3.0.0'
27
27
 
28
28
  s.add_runtime_dependency 'xot', '~> 0.1.39'
29
- s.add_runtime_dependency 'rucy', '~> 0.1.39'
29
+ s.add_runtime_dependency 'rucy', '~> 0.1.40'
30
30
 
31
31
  s.add_development_dependency 'rake'
32
32
  s.add_development_dependency 'test-unit'
data/src/color_space.cpp CHANGED
@@ -1,7 +1,6 @@
1
1
  #include "color_space.h"
2
2
 
3
3
 
4
- #include <assert.h>
5
4
  #include <xot/util.h>
6
5
  #include "rays/exception.h"
7
6
 
data/src/image.cpp CHANGED
@@ -155,13 +155,8 @@ namespace Rays
155
155
  if (pixel_density <= 0)
156
156
  argument_error(__FILE__, __LINE__, "invalid pixel_density.");
157
157
 
158
- coord w = width * pixel_density;
159
- coord h = height * pixel_density;
160
- if ((w - (int) w) != 0 || (h - (int) h) != 0)
161
- argument_error(__FILE__, __LINE__, "invalid size for image.");
162
-
163
- self->width = w;
164
- self->height = h;
158
+ self->width = (int) (width * pixel_density);
159
+ self->height = (int) (height * pixel_density);
165
160
  self->color_space = cs;
166
161
  self->pixel_density = pixel_density;
167
162
  }
data/src/ios/bitmap.mm CHANGED
@@ -2,6 +2,7 @@
2
2
  #import "bitmap.h"
3
3
 
4
4
 
5
+ #include <assert.h>
5
6
  #import <ImageIO/CGImageDestination.h>
6
7
  #import <MobileCoreServices/UTCoreTypes.h>
7
8
  #include "rays/exception.h"
data/src/ios/camera.mm CHANGED
@@ -2,6 +2,7 @@
2
2
  #import "rays/camera.h"
3
3
 
4
4
 
5
+ #include <assert.h>
5
6
  #import <AVFoundation/AVFoundation.h>
6
7
  #include "rays/exception.h"
7
8
  #include "bitmap.h"
data/src/osx/bitmap.mm CHANGED
@@ -2,6 +2,7 @@
2
2
  #import "bitmap.h"
3
3
 
4
4
 
5
+ #include <assert.h>
5
6
  #import <Cocoa/Cocoa.h>
6
7
  #include "rays/exception.h"
7
8
  #include "../color_space.h"
data/src/polygon.cpp CHANGED
@@ -480,7 +480,7 @@ namespace Rays
480
480
  round_left_top == 0 && round_right_top == 0 &&
481
481
  round_left_bottom == 0 && round_right_bottom == 0)
482
482
  {
483
- setup_rect(x, y, width, height, nsegment);
483
+ setup_rect(x, y, width, height);
484
484
  }
485
485
  else
486
486
  {
@@ -509,9 +509,7 @@ namespace Rays
509
509
  coord x, y, offset_sign_x, offset_sign_y, round;
510
510
  };
511
511
 
512
- void setup_rect (
513
- coord x, coord y, coord width, coord height,
514
- uint nsegment)
512
+ void setup_rect (coord x, coord y, coord width, coord height)
515
513
  {
516
514
  const Point points[] = {
517
515
  Point(x, y),
@@ -846,7 +844,7 @@ namespace Rays
846
844
  }
847
845
 
848
846
  Polygon
849
- create_rect(const Bounds& bounds, coord round, uint nsegment)
847
+ create_rect (const Bounds& bounds, coord round, uint nsegment)
850
848
  {
851
849
  return create_rect(
852
850
  bounds.x, bounds.y, bounds.width, bounds.height,
data/src/shader.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "shader.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <regex>
5
6
  #include "rays/exception.h"
6
7
  #include "opengl.h"
data/src/win32/bitmap.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "../bitmap.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include "font.h"
5
6
  #include "gdi.h"
6
7
 
data/src/win32/gdi.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "gdi.h"
2
2
 
3
3
 
4
+ #include <assert.h>
4
5
  #include <vector>
5
6
 
6
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rays
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.42
4
+ version: 0.1.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-11 00:00:00.000000000 Z
11
+ date: 2023-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xot
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.39
33
+ version: 0.1.40
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.39
40
+ version: 0.1.40
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement