ruby-libgd 0.1.8 → 0.1.9
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.so +0 -0
- data/ext/gd/image.c +6 -2
- data/ext/gd/image.o +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 10e229811501d0549a9245fdae405a48b3e6fa7153c1fcaf690dac5fdeee4aa9
|
|
4
|
+
data.tar.gz: d3e956be12a1edc58d72460dfcddf5a60b766c21733d51281384339bca728928
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e654b2ac618056233479bc418d7a19c520232a9a9abd280aa733f7f9d227841831f731c4b1ecff5f85e97b74da50014bb0c52f5ed8e9750243f907e3024e0a8
|
|
7
|
+
data.tar.gz: 40db153802b81c7efd01cb64ed21c21dbc5e54c4bf64957774d9973361ea81de5249ba40bd5bed03cd0053d52be95ef5811e78791977d0452f05260a4fed406d
|
data/ext/gd/gd.so
CHANGED
|
Binary file
|
data/ext/gd/image.c
CHANGED
|
@@ -18,10 +18,14 @@ static VALUE gd_image_initialize(int argc, VALUE *argv, VALUE self) {
|
|
|
18
18
|
if (w <= 0 || h <= 0)
|
|
19
19
|
rb_raise(rb_eArgError, "width and height must be positive");
|
|
20
20
|
|
|
21
|
-
wrap->img = gdImageCreateTrueColor(w,
|
|
21
|
+
wrap->img = gdImageCreateTrueColor(w,h);
|
|
22
|
+
gdImageSaveAlpha(wrap->img, 1);
|
|
23
|
+
gdImageAlphaBlending(wrap->img, 0);
|
|
24
|
+
|
|
25
|
+
int transparent = gdTrueColorAlpha(0,0,0,127);
|
|
26
|
+
gdImageFilledRectangle(wrap->img, 0,0,w,h, transparent);
|
|
22
27
|
|
|
23
28
|
gdImageAlphaBlending(wrap->img, 1);
|
|
24
|
-
gdImageSaveAlpha(wrap->img, 1);
|
|
25
29
|
|
|
26
30
|
int t = gdTrueColorAlpha(0,0,0,127);
|
|
27
31
|
gdImageFilledRectangle(wrap->img, 0, 0, w-1, h-1, t);
|
data/ext/gd/image.o
CHANGED
|
Binary file
|