ruby-libgd 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/gd/gd.c +0 -1
- data/ext/gd/gd.o +0 -0
- data/ext/gd/gd.so +0 -0
- data/ext/gd/image.c +10 -6
- data/ext/gd/image.o +0 -0
- data/ext/gd/ruby_gd.h +0 -1
- 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: c241cee619edc2c0a7f1c5b817d1b53d8c5927b721891ab2579d9adb10dc1161
|
|
4
|
+
data.tar.gz: ae707b24a98ab4e4f55c8667e55b56308c74ac0aa5a85a166aac110663b7c714
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e44fa537015326a1f2a8a955b076e340a17f4e95317fd1ba90abcc40a60da8713a4815b8a6fcc0fe9f363600038f7af11da2cf470260a4db54487bd5948ab73
|
|
7
|
+
data.tar.gz: d40dc2e849d313221d43285b02e1d155f531208e58bb041b87d1a10fe1e216ee37563f9465b124002061c8dd5dbe3afecff280de1fc2f7f10b52a14a95bbbcae
|
data/ext/gd/gd.c
CHANGED
data/ext/gd/gd.o
CHANGED
|
Binary file
|
data/ext/gd/gd.so
CHANGED
|
Binary file
|
data/ext/gd/image.c
CHANGED
|
@@ -274,18 +274,20 @@ static VALUE gd_image_antialias(VALUE self, VALUE flag) {
|
|
|
274
274
|
gd_image_wrapper *wrap;
|
|
275
275
|
TypedData_Get_Struct(self, gd_image_wrapper, &gd_image_type, wrap);
|
|
276
276
|
|
|
277
|
+
if (!wrap->img)
|
|
278
|
+
rb_raise(rb_eRuntimeError, "image is NULL");
|
|
279
|
+
|
|
277
280
|
if (RTEST(flag)) {
|
|
278
|
-
|
|
281
|
+
int aa = gdTrueColorAlpha(255,255,255,0);
|
|
282
|
+
gdImageSetAntiAliased(wrap->img, aa);
|
|
283
|
+
gdImageAlphaBlending(wrap->img, 1);
|
|
279
284
|
} else {
|
|
280
285
|
gdImageSetAntiAliased(wrap->img, -1);
|
|
281
286
|
}
|
|
282
287
|
|
|
283
|
-
return
|
|
288
|
+
return flag;
|
|
284
289
|
}
|
|
285
290
|
|
|
286
|
-
void gd_define_antialias(VALUE cGDImage) {
|
|
287
|
-
rb_define_method(cGDImage, "antialias", gd_image_antialias, 1);
|
|
288
|
-
}
|
|
289
291
|
|
|
290
292
|
void gd_define_image(VALUE mGD) {
|
|
291
293
|
VALUE cGDImage = rb_define_class_under(mGD, "Image", rb_cObject);
|
|
@@ -302,5 +304,7 @@ void gd_define_image(VALUE mGD) {
|
|
|
302
304
|
rb_define_singleton_method(cGDImage, "new_true_color", gd_image_s_new_true_color, 2);
|
|
303
305
|
rb_define_method(cGDImage, "alpha_blending=", gd_image_alpha_blending, 1);
|
|
304
306
|
rb_define_method(cGDImage, "save_alpha=", gd_image_save_alpha, 1);
|
|
305
|
-
rb_define_method(cGDImage, "antialias", gd_image_antialias, 1);
|
|
307
|
+
rb_define_method(cGDImage, "antialias=", gd_image_antialias, 1);
|
|
308
|
+
rb_define_method(cGDImage, "antialias", gd_image_antialias, 1);
|
|
309
|
+
|
|
306
310
|
}
|
data/ext/gd/image.o
CHANGED
|
Binary file
|
data/ext/gd/ruby_gd.h
CHANGED
|
@@ -17,7 +17,6 @@ int color_to_gd(gdImagePtr im, VALUE color);
|
|
|
17
17
|
void gd_define_image(VALUE mGD);
|
|
18
18
|
void gd_define_blit(VALUE cGDImage);
|
|
19
19
|
void gd_define_fill(VALUE cGDImage);
|
|
20
|
-
void gd_define_antialias(VALUE cGDImage);
|
|
21
20
|
|
|
22
21
|
void gd_define_pixel(VALUE cGDImage);
|
|
23
22
|
void gd_define_line(VALUE cGDImage);
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby-libgd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Germán Alberto Giménez Silva
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: High-performance native Ruby bindings to libgd for image generation,
|
|
14
14
|
drawing, filters, alpha blending, and transformations.
|