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.27 1999/07/03 09:10:49 mirar Exp $ + **! $Id: layers.c,v 1.28 1999/07/21 02:59:07 hubbe Exp $   **! class Layer   **! see also: layers   **!      **!   **!   **! <add_appendix name="layers" title="Image.Layer modes"><execute>   **! import Image;   **!   **! void write_image(string desc,   **! string filename,   **! Image img)   **! {   **! begin_tag("tr");   **! write(mktag("td",(["align":"right","valign":"center"]),   **! mktag("b",0,desc))); - **! write(mktag("td",(["align":"right"]),illustration_jpeg(img))); + **! write(mktag("td",(["align":"right"]),illustration_jpeg(img,(["dpi":150.0]))));   **! write(end_tag());   **! }   **!   **! int main()   **! {   **! object ltrans=Layer((["image":   **! Image(32,32,160,160,160)->   **! box(0,0,15,15,96,96,96)->   **! box(16,16,31,31,96,96,96)->scale(0.5),   **! "tiled":1,
pike.git/src/modules/Image/layers.c:188:   **! }   **!   **! </execute>   **! </add_appendix>   */      #include "global.h"      #include <math.h> /* floor */    - RCSID("$Id: layers.c,v 1.27 1999/07/03 09:10:49 mirar Exp $"); + RCSID("$Id: layers.c,v 1.28 1999/07/21 02:59:07 hubbe Exp $");      #include "image_machine.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:2623:    ADD_FUNCTION("fill",image_layer_fill,tFunc(tNone,tObj),0);    ADD_FUNCTION("fill_alpha",image_layer_fill_alpha,tFunc(tNone,tObj),0);       ADD_FUNCTION("tiled",image_layer_tiled,tFunc(tNone,tInt01),0);       /* image-object operations */       ADD_FUNCTION("crop",image_layer_crop,    tFunc(tInt tInt tInt tInt,tObj),0);    ADD_FUNCTION("autocrop",image_layer_autocrop, -  tFuncV(,tOr(tVoid,tInt),tObj),0); +  tFuncV(tNone,tOr(tVoid,tInt),tObj),0);    ADD_FUNCTION("find_autocrop",image_layer_find_autocrop, -  tFuncV(,tOr(tVoid,tInt),tObj),0); +  tFuncV(tNone,tOr(tVoid,tInt),tObj),0);       /*    ADD_FUNCTION("rotate",image_layer_rotate,tFunc(tOr(tInt,tFloat),tObj),0);    ADD_FUNCTION("scale",image_layer_scale,tOr3(tFunc(tInt tInt,tObj),    tFunc(tFloat,tObj),    tFunc(tFloat,tFloat,tObj)),0);    ADD_FUNCTION("translate",image_layer_translate,    tFunc(tOr(tInt,tFlt) tOr(tInt,tFlt),tObj),0);    */   }      void exit_image_layers(void)   {    int i;       for (i=0; i<LAYER_MODES; i++)    free_string(layer_mode[i].ps);   }