summaryrefslogtreecommitdiff
path: root/tests/gdimagesetpixel
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2018-06-21 21:44:54 -0400
committerMike Frysinger <vapier@gentoo.org>2018-06-21 21:44:54 -0400
commitaac77143ddeb561216d9fe63546d17a1d2156bae (patch)
tree37e53e5369364f319bc95e3ed708eb5a3266cd17 /tests/gdimagesetpixel
parentc4ee95d1a403061707c17dcae0343ad059e08d2f (diff)
downloadlibgd-aac77143ddeb561216d9fe63546d17a1d2156bae.tar.gz
convert all files to native line encodings
A bunch of these files were committed with Windows line encodings. Strip all those ^M gremlins out as people working on Windows can use git's autocrlf setting to convert back and forth as needed.
Diffstat (limited to 'tests/gdimagesetpixel')
-rw-r--r--tests/gdimagesetpixel/alpha_blending.c106
1 files changed, 52 insertions, 54 deletions
diff --git a/tests/gdimagesetpixel/alpha_blending.c b/tests/gdimagesetpixel/alpha_blending.c
index 394ced5..f182d59 100644
--- a/tests/gdimagesetpixel/alpha_blending.c
+++ b/tests/gdimagesetpixel/alpha_blending.c
@@ -1,54 +1,52 @@
-/**
- * Testing all effects
- */
-
-
-#include "gd.h"
-#include "gdtest.h"
-
-
-int main()
-{
- gdImagePtr im;
- int effects[] = {
- gdEffectReplace, gdEffectAlphaBlend, gdEffectNormal,
- gdEffectOverlay, gdEffectMultiply
- };
- int red[3], blue[3];
- int x, y, i, j;
- char *path;
-
- red[0] = gdTrueColorAlpha(0, 0, 255, 127);
- red[1] = gdTrueColorAlpha(0, 0, 255, 63);
- red[2] = gdTrueColorAlpha(0, 0, 255, 0);
- blue[0] = gdTrueColorAlpha(255, 0, 0, 127);
- blue[1] = gdTrueColorAlpha(255, 0, 0, 63);
- blue[2] = gdTrueColorAlpha(255, 0, 0, 0);
-
- im = gdImageCreateTrueColor(120, 180);
-
- gdImageAlphaBlending(im, gdEffectReplace);
- for (j = 0; j < 3; j++) {
- y = 60 * j;
- gdImageFilledRectangle(im, 0,y, 119,y+59, red[j]);
- }
-
- for (i = 0; i < 5; i++) {
- x = 20 * i;
- gdImageAlphaBlending(im, effects[i]);
- for (j = 0; j < 9; j++) {
- y = 20 * j;
- gdImageFilledRectangle(im, x+20,y, x+39,y+19, blue[j % 3]);
- }
- }
-
- gdImageSaveAlpha(im, 1);
-
- path = gdTestFilePath2("gdimagesetpixel", "alphablending_exp.png");
- gdAssertImageEqualsToFile(path, im);
- gdFree(path);
-
- gdImageDestroy(im);
-
- return gdNumFailures();
-}
+/**
+ * Testing all effects
+ */
+
+#include "gd.h"
+#include "gdtest.h"
+
+int main()
+{
+ gdImagePtr im;
+ int effects[] = {
+ gdEffectReplace, gdEffectAlphaBlend, gdEffectNormal,
+ gdEffectOverlay, gdEffectMultiply
+ };
+ int red[3], blue[3];
+ int x, y, i, j;
+ char *path;
+
+ red[0] = gdTrueColorAlpha(0, 0, 255, 127);
+ red[1] = gdTrueColorAlpha(0, 0, 255, 63);
+ red[2] = gdTrueColorAlpha(0, 0, 255, 0);
+ blue[0] = gdTrueColorAlpha(255, 0, 0, 127);
+ blue[1] = gdTrueColorAlpha(255, 0, 0, 63);
+ blue[2] = gdTrueColorAlpha(255, 0, 0, 0);
+
+ im = gdImageCreateTrueColor(120, 180);
+
+ gdImageAlphaBlending(im, gdEffectReplace);
+ for (j = 0; j < 3; j++) {
+ y = 60 * j;
+ gdImageFilledRectangle(im, 0,y, 119,y+59, red[j]);
+ }
+
+ for (i = 0; i < 5; i++) {
+ x = 20 * i;
+ gdImageAlphaBlending(im, effects[i]);
+ for (j = 0; j < 9; j++) {
+ y = 20 * j;
+ gdImageFilledRectangle(im, x+20,y, x+39,y+19, blue[j % 3]);
+ }
+ }
+
+ gdImageSaveAlpha(im, 1);
+
+ path = gdTestFilePath2("gdimagesetpixel", "alphablending_exp.png");
+ gdAssertImageEqualsToFile(path, im);
+ gdFree(path);
+
+ gdImageDestroy(im);
+
+ return gdNumFailures();
+}