summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-11-29 01:44:19 +0000
committerMarcus Boerger <helly@php.net>2002-11-29 01:44:19 +0000
commit65eb0d81258fd3274b8ab9665b9a7813efedcf86 (patch)
tree8334071512165996db48b909bc3d4af1f54a6e40
parent0a7487e32d380c6b1865255c6a340522c62d503a (diff)
downloadphp-git-65eb0d81258fd3274b8ab9665b9a7813efedcf86.tar.gz
Conversion fixes
-rw-r--r--ext/gd/libgd/gd.c2
-rw-r--r--ext/gd/libgd/gd_jpeg.c2
-rw-r--r--ext/gd/libgd/gdft.c14
3 files changed, 11 insertions, 7 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 348092ccfc..56eb5c89fb 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -1092,7 +1092,7 @@ gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
else
{
/* More-or-less vertical. use wid for horizontal stroke */
- wid = thick * sin (atan2 (dy, dx));
+ wid = (int)(thick * sin (atan2 (dy, dx)));
vert = 0;
d = 2 * dx - dy;
diff --git a/ext/gd/libgd/gd_jpeg.c b/ext/gd/libgd/gd_jpeg.c
index 17f40ca41a..a1bd445d6a 100644
--- a/ext/gd/libgd/gd_jpeg.c
+++ b/ext/gd/libgd/gd_jpeg.c
@@ -812,7 +812,7 @@ term_destination (j_compress_ptr cinfo)
/* Write any data remaining in the buffer */
if (datacount > 0)
{
- if (gdPutBuf (dest->buffer, datacount, dest->outfile) != datacount)
+ if ((size_t)gdPutBuf (dest->buffer, datacount, dest->outfile) != datacount)
ERREXIT (cinfo, JERR_FILE_WRITE);
}
}
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index 4e1aed436e..746613e438 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -26,6 +26,10 @@ extern int access(const char *pathname, int mode);
#endif
/* number of antialised colors for indexed bitmaps */
+/* overwrite Windows GDI define in case of windows build */
+#ifdef NUMCOLORS
+#undef NUMCOLORS
+#endif
#define NUMCOLORS 8
char *
@@ -880,8 +884,8 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
if (ch == '\r')
{
penf.x = 0;
- x1 = (penf.x * cos_a - penf.y * sin_a + 32) / 64;
- y1 = (penf.x * sin_a + penf.y * cos_a + 32) / 64;
+ x1 = (int)(penf.x * cos_a - penf.y * sin_a + 32) / 64;
+ y1 = (int)(penf.x * sin_a + penf.y * cos_a + 32) / 64;
pen.x = pen.y = 0;
previous = 0; /* clear kerning flag */
next++;
@@ -890,10 +894,10 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
/* newlines */
if (ch == '\n')
{
- penf.y -= face->size->metrics.height * linespace;
+ penf.y -= (long)(face->size->metrics.height * linespace);
penf.y = (penf.y - 32) & -64; /* round to next pixel row */
- x1 = (penf.x * cos_a - penf.y * sin_a + 32) / 64;
- y1 = (penf.x * sin_a + penf.y * cos_a + 32) / 64;
+ x1 = (int)(penf.x * cos_a - penf.y * sin_a + 32) / 64;
+ y1 = (int)(penf.x * sin_a + penf.y * cos_a + 32) / 64;
pen.x = pen.y = 0;
previous = 0; /* clear kerning flag */
next++;