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

version» Context lines:

pike.git/src/modules/Image/font.c:1: - /* $Id: font.c,v 1.47 1999/04/25 20:03:36 grubba Exp $ */ + /* $Id: font.c,v 1.48 1999/05/23 17:46:40 mirar Exp $ */   #include "global.h"   #include <config.h>      #define SPACE_CHAR 'i'      /*   **! module Image   **! note - **! $Id: font.c,v 1.47 1999/04/25 20:03:36 grubba Exp $ + **! $Id: font.c,v 1.48 1999/05/23 17:46:40 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:870:      /*      int load(string filename); // load font file, true is success   object write(string text); // new image object   int height(); // font heigth   int baseline(); // font baseline      */    - void init_font_programs(void) + void init_image_font(void)   { -  start_new_program(); +     ADD_STORAGE(struct font*);       /* function(string:object|int) */    ADD_FUNCTION("load",font_load,tFunc(tStr,tOr(tObj,tInt)),0);       /* function(void|string:void) */    ADD_FUNCTION("create",font_create,tFunc(tOr(tVoid,tStr),tVoid),0);       /* function(string:object) */    ADD_FUNCTION("write",font_write,tFunc(tStr,tObj),0);
pike.git/src/modules/Image/font.c:912:    /* function(void:void) */    ADD_FUNCTION("center", font_set_center,tFunc(tVoid,tVoid), 0);    /* function(void:void) */    ADD_FUNCTION("left", font_set_left,tFunc(tVoid,tVoid), 0);    /* function(void:void) */    ADD_FUNCTION("right", font_set_right,tFunc(tVoid,tVoid), 0);          set_init_callback(init_font_struct);    set_exit_callback(exit_font_struct); -  -  font_program=end_program(); -  add_program_constant("font",font_program, 0); /* compat */ -  add_program_constant("Font",font_program, 0); +    }    - void exit_font(void) + void exit_image_font(void)   { -  if(font_program) -  { -  free_program(font_program); -  font_program=0; +    } - } +