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

version» Context lines:

pike.git/src/modules/Image/font.c:1: - /* $Id: font.c,v 1.36 1998/05/04 11:49:57 mirar Exp $ */ + /* $Id: font.c,v 1.37 1998/05/04 16:28:08 mirar Exp $ */   #include "global.h"   #include <config.h>      #define SPACE_CHAR 'i'      /*   **! module Image   **! note - **! $Id: font.c,v 1.36 1998/05/04 11:49:57 mirar Exp $ + **! $Id: font.c,v 1.37 1998/05/04 16:28:08 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:325:   **! returns zero upon failure, font object upon success   **! arg string filename   **! Font file   **! see also: write   **!   **! method void create(string filename)   **! Loads a font file to this font object.   **! Similar to <ref>load</ref>().   */    + void font_load(INT32 args);    -  + void font_create(INT32 args) + { +  if (args) font_load(args); +  pop_n_elems(1); + } +    void font_load(INT32 args)   {    int fd;       if (args<1    || sp[-args].type!=T_STRING)    error("font->read: illegal or wrong number of arguments\n");       if (THIS)    {
pike.git/src/modules/Image/font.c:759:      void init_font_programs(void)   {    start_new_program();    add_storage(sizeof(struct font*));       add_function("load",font_load,    "function(string:object|int)",0);       add_function("create",font_load, -  "function(string:object|int)",0); +  "function(void|string:void)",0);       add_function("write",font_write,    "function(string:object)",0);       add_function("height",font_height,    "function(:int)",0);       add_function("baseline",font_baseline,    "function(:int)",0);