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

version» Context lines:

pike.git/src/modules/Image/layers.c:1:   /*   **! module Image   **! note - **! $Id: layers.c,v 1.11 1999/05/08 00:42:12 hubbe Exp $ + **! $Id: layers.c,v 1.12 1999/05/23 17:46:44 mirar Exp $   **! class Layer   */      #include "global.h"   #include <config.h>      #include <math.h> /* floor */    - RCSID("$Id: layers.c,v 1.11 1999/05/08 00:42:12 hubbe Exp $"); + RCSID("$Id: layers.c,v 1.12 1999/05/23 17:46:44 mirar Exp $");      #include "config.h"      #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "array.h"
pike.git/src/modules/Image/layers.c:2053:      void init_image_layers(void)   {    char buf[100];    char buf2[sizeof(INT32)];    int i;       for (i=0; i<LAYER_MODES; i++)    layer_mode[i].ps=make_shared_string(layer_mode[i].name);    -  start_new_program(); +  /* layer object */       ADD_STORAGE(struct layer);    set_init_callback(init_layer);    set_exit_callback(exit_layer);    - #define tLayerMap tMap(tString,tOr4(tString,tColor,tFloat,tInt)) -  +     ADD_FUNCTION("create",image_layer_create,    tOr4(tFunc(,tVoid),    tFunc(tObj tOr(tObj,tVoid) tOr(tString,tVoid),tVoid),    tFunc(tLayerMap,tVoid),    tFunc(tInt tInt    tOr(tColor,tVoid) tOr(tColor,tVoid),tVoid)),0);       ADD_FUNCTION("cast",image_layer_cast,    tFunc(tString,tMapping),0);   
pike.git/src/modules/Image/layers.c:2102:    ADD_FUNCTION("ysize",image_layer_ysize,tFunc(,tInt),0);       ADD_FUNCTION("xoffset",image_layer_xoffset,tFunc(,tInt),0);    ADD_FUNCTION("yoffset",image_layer_yoffset,tFunc(,tInt),0);       ADD_FUNCTION("alpha_value",image_layer_alpha_value,tFunc(,tFloat),0);    ADD_FUNCTION("fill",image_layer_fill,tFunc(,tObj),0);    ADD_FUNCTION("fill_alpha",image_layer_fill_alpha,tFunc(,tObj),0);       ADD_FUNCTION("tiled",image_layer_tiled,tFunc(,tInt01),0); -  -  image_layer_program=end_program(); -  -  add_program_constant("Layer",image_layer_program,0); -  -  ADD_FUNCTION("lay",image_lay, -  tOr(tFunc(tArr(tOr(tObj,tLayerMap)),tObj), -  tFunc(tArr(tOr(tObj,tLayerMap)) -  tInt tInt tInt tInt,tObj)),0); +    }      void exit_image_layers(void)   {    int i;       for (i=0; i<LAYER_MODES; i++)    free_string(layer_mode[i].ps); -  -  if (image_layer_program) -  { -  free_program(image_layer_program); -  image_layer_program=NULL; +    } - } +