rays 0.1.44 → 0.1.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +5 -0
- data/VERSION +1 -1
- data/src/image.cpp +14 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de6e5c2c628009735eed4907bd62ec314d315daab2b001e3c37a365f71b6f19b
|
4
|
+
data.tar.gz: c18e37667880bd753332a216f56a59c473ce4fbb2e7b65eb98894d6718d4e506
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e11a2e80087715bf194d3857950386d7cbad58c9273d2d7f85d2701d58e0978c6bc966145c60582f896ffdc2066ead9b58649d41fc41910101028cc02cbd75a
|
7
|
+
data.tar.gz: a0db99c72e1dd15a7731ff18a20a452929bf8fa2701a95cd31fd093bfbcdf09451de0cadf9e5d2e327066fd595124966218352fc25d14ccbae9cd6dca47e1728
|
data/ChangeLog.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.45
|
data/src/image.cpp
CHANGED
@@ -30,6 +30,15 @@ namespace Rays
|
|
30
30
|
};// Image::Data
|
31
31
|
|
32
32
|
|
33
|
+
static void
|
34
|
+
clear_modified_flags (Image* image)
|
35
|
+
{
|
36
|
+
Image::Data* self = image->self.get();
|
37
|
+
|
38
|
+
if (self->bitmap) Bitmap_set_modified(&self->bitmap, false);
|
39
|
+
if (self->texture) self->texture.set_modified(false);
|
40
|
+
}
|
41
|
+
|
33
42
|
static void
|
34
43
|
invalidate_texture (Image* image)
|
35
44
|
{
|
@@ -64,7 +73,7 @@ namespace Rays
|
|
64
73
|
|
65
74
|
Image::Data* self = image->self.get();
|
66
75
|
|
67
|
-
if (
|
76
|
+
if (!*image)
|
68
77
|
{
|
69
78
|
assert(!self->bitmap);
|
70
79
|
return self->bitmap;
|
@@ -76,6 +85,7 @@ namespace Rays
|
|
76
85
|
self->bitmap = Bitmap_from(self->texture);
|
77
86
|
else
|
78
87
|
self->bitmap = Bitmap(self->width, self->height, self->color_space);
|
88
|
+
clear_modified_flags(image);
|
79
89
|
}
|
80
90
|
else if (
|
81
91
|
self->texture &&
|
@@ -83,11 +93,9 @@ namespace Rays
|
|
83
93
|
!Bitmap_get_modified(self->bitmap))
|
84
94
|
{
|
85
95
|
self->bitmap = Bitmap_from(self->texture);
|
96
|
+
clear_modified_flags(image);
|
86
97
|
}
|
87
98
|
|
88
|
-
if (self->bitmap) Bitmap_set_modified(&self->bitmap, false);
|
89
|
-
if (self->texture) self->texture.set_modified(false);
|
90
|
-
|
91
99
|
return self->bitmap;
|
92
100
|
}
|
93
101
|
|
@@ -117,6 +125,7 @@ namespace Rays
|
|
117
125
|
p.clear();
|
118
126
|
p.end();
|
119
127
|
}
|
128
|
+
clear_modified_flags(&image);
|
120
129
|
}
|
121
130
|
else if (
|
122
131
|
self->bitmap &&
|
@@ -124,11 +133,9 @@ namespace Rays
|
|
124
133
|
!self->texture.modified())
|
125
134
|
{
|
126
135
|
self->texture = Texture(self->bitmap);
|
136
|
+
clear_modified_flags(&image);
|
127
137
|
}
|
128
138
|
|
129
|
-
if (self->bitmap) Bitmap_set_modified(&self->bitmap, false);
|
130
|
-
if (self->texture) self->texture.set_modified(false);
|
131
|
-
|
132
139
|
return self->texture;
|
133
140
|
}
|
134
141
|
|
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.
|
4
|
+
version: 0.1.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xot
|