pike.git / src / modules / Image / font.c

version» Context lines:

pike.git/src/modules/Image/font.c:1: - /* $Id: font.c,v 1.27 1998/01/26 20:01:58 hubbe Exp $ */ + /* $Id: font.c,v 1.28 1998/02/07 22:28:38 mirar Exp $ */   #include <config.h>      #define SPACE_CHAR 'i'      /*   **! module Image   **! note - **! $Id: font.c,v 1.27 1998/01/26 20:01:58 hubbe Exp $ + **! $Id: font.c,v 1.28 1998/02/07 22:28:38 mirar Exp $   **! class font   **!   **! note   **! Short technical documentation on a font file:   **! This object adds the text-drawing and -creation   **! capabilities of the <ref>Image</ref> module.   **!   **! For simple usage, see   **! <ref>write</ref> and <ref>load</ref>.   **!
pike.git/src/modules/Image/font.c:494:    width_of[j]=xsize;    if (xsize>maxwidth2) maxwidth2=xsize;    }       o = clone_object(image_program,0);    img = ((struct image*)o->storage);    img->xsize = maxwidth2;    if(args>1)    img->ysize = this->height+((double)this->height*(double)(args-1)*(double)this->yspacing_scale)+1;    else -  img->ysize = this->height+1; +  img->ysize = this->height;    img->rgb.r=img->rgb.g=img->rgb.b=255; -  img->img=malloc(img->xsize*img->ysize*sizeof(rgb_group)); +  img->img=malloc(img->xsize*img->ysize*sizeof(rgb_group)+1);       if (!img) { free_object(o); free(width_of); error("Out of memory\n"); }       MEMSET(img->img,0,img->xsize*img->ysize*sizeof(rgb_group));       for (j=0; j<args; j++)    {    to_write = (unsigned char *)sp[j-args].u.string->str;    to_write_len = sp[j-args].u.string->len;    switch(this->justification)