iliaa           Tue Jun  3 19:54:56 2003 EDT

  Modified files:              
    /php4/ext/gd        gd.c 
    /php4/ext/gd/libgd  gd.c gdft.c 
  Log:
  Syncronize bunbled GD with gd 2.0.14
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.269 php4/ext/gd/gd.c:1.270
--- php4/ext/gd/gd.c:1.269      Wed May 14 22:25:50 2003
+++ php4/ext/gd/gd.c    Tue Jun  3 19:54:55 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: gd.c,v 1.269 2003/05/15 02:25:50 iliaa Exp $ */
+/* $Id: gd.c,v 1.270 2003/06/03 23:54:55 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
    Cold Spring Harbor Labs. */
@@ -440,7 +440,7 @@
 /* }}} */
 
 #if HAVE_GD_BUNDLED
-#define PHP_GD_VERSION_STRING "bundled (2.0.12 compatible)"
+#define PHP_GD_VERSION_STRING "bundled (2.0.14 compatible)"
 #elif HAVE_LIBGD20
 #define PHP_GD_VERSION_STRING "2.0 or higher"
 #elif HAVE_GDIMAGECOLORRESOLVE
Index: php4/ext/gd/libgd/gd.c
diff -u php4/ext/gd/libgd/gd.c:1.50 php4/ext/gd/libgd/gd.c:1.51
--- php4/ext/gd/libgd/gd.c:1.50 Sat Apr  5 12:23:54 2003
+++ php4/ext/gd/libgd/gd.c      Tue Jun  3 19:54:56 2003
@@ -873,6 +873,11 @@
        float p_dist, p_alpha;
        unsigned char opacity;
 
+       /* 2.0.13: bounds check! AA_opacity is just as capable of overflowing as the 
main pixel array. Arne Jorgensen. */
+       if (!gdImageBoundsSafeMacro(im, px, py)) {
+               return;
+       }
+
        /* 
         * Find the perpendicular distance from point C (px, py) to the line 
         * segment AB that is being drawn.  (Adapted from an algorithm from the
@@ -2060,12 +2065,8 @@
                                tox++;
                                continue;
                        }
-                       /* 
-                        * If it's the same image, mapping is NOT trivial since we 
-                        * merge with greyscale target, but if pct is 100, the grey 
-                        * value is not used, so it becomes trivial. pjw 2.0.12. 
-                        */
-                       if (dst == src && pct == 100) {
+                       /* If it's the same image, mapping is trivial */
+                       if (dst == src) {
                                nc = c;
                        } else {
                                dc = gdImageGetPixel(dst, tox, toy);
@@ -2105,8 +2106,12 @@
                                tox++;
                                continue;
                        }
-                       /* If it's the same image, mapping is trivial */
-                       if (dst == src) {
+                       /* 
+                        * If it's the same image, mapping is NOT trivial since we 
+                        * merge with greyscale target, but if pct is 100, the grey 
+                        * value is not used, so it becomes trivial. pjw 2.0.12. 
+                        */
+                       if (dst == src && pct == 100) {
                                nc = c;
                        } else {
                                dc = gdImageGetPixel(dst, tox, toy);
Index: php4/ext/gd/libgd/gdft.c
diff -u php4/ext/gd/libgd/gdft.c:1.22 php4/ext/gd/libgd/gdft.c:1.23
--- php4/ext/gd/libgd/gdft.c:1.22       Wed Apr 30 12:26:22 2003
+++ php4/ext/gd/libgd/gdft.c    Tue Jun  3 19:54:56 2003
@@ -790,7 +790,8 @@
        char *tmpstr = NULL;
        int render = (im && (im->trueColor || (fg <= 255 && fg >= -255)));
        FT_BitmapGlyph bm;
-       int render_mode = FT_LOAD_RENDER | FT_LOAD_FORCE_AUTOHINT;
+       /* 2.0.13: Bob Ostermann: don't force autohint, that's just for testing 
freetype and doesn't look as good */
+       int render_mode = FT_LOAD_DEFAULT;
        int m, mfound;
        /* Now tuneable thanks to Wez Furlong */
        double linespace = LINESPACE;
@@ -909,6 +910,8 @@
                }
                /* newlines */
                if (ch == '\n') {
+                       /* 2.0.13: reset penf.x. Christopher J. Grayce */
+                       penf.x = 0;
                          penf.y -= (long)(face->size->metrics.height * linespace);
                          penf.y = (penf.y - 32) & -64;         /* round to next pixel 
row */
                          x1 = (int)(penf.x * cos_a - penf.y * sin_a + 32) / 64;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to