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.23 1999/06/30 11:02:56 mirar Exp $ + **! $Id: layers.c,v 1.24 1999/06/30 21:54:19 mirar Exp $   **! class Layer   **! see also: layers   **!      **!   **!   **! <add_appendix name="layers" title="Image.Layer modes"><execute>   **! import Image;   **!   **! void write_image(string desc,
pike.git/src/modules/Image/layers.c:145:   **! }   **!   **! </execute>   **! </add_appendix>   */      #include "global.h"      #include <math.h> /* floor */    - RCSID("$Id: layers.c,v 1.23 1999/06/30 11:02:56 mirar Exp $"); + RCSID("$Id: layers.c,v 1.24 1999/06/30 21:54:19 mirar 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:482:    if ((SA)->C==COLORMAX) \    (D)->C=COMBINE_ALPHA_V((S)->C,(L)->C,COLORMAX,255,V); \    else \    (D)->C=COMBINE_ALPHA_V((S)->C,(L)->C,(SA)->C,255,V); \    (DA)->C=COMBINE_ALPHA_SUM_V((SA)->C,255,V); \    } \    } while(0)      #define ALPHA_ADD_V(L,S,D,LA,SA,DA,V,C) \    do { \ -  if (!(LA)->C) \ -  { \ -  (D)->C=COMBINE_ALPHA_V((S)->C,(L)->C,(SA)->C,0,V); \ -  (DA)->C=COMBINE_ALPHA_SUM_V(0,(SA)->C,V); \ -  } \ +  if (!(LA)->C) (D)->C=(S)->C,(DA)->C=(SA)->C; \    else if (!(SA)->C) \    { \    (D)->C=COMBINE_ALPHA_V((S)->C,(L)->C,0,(LA)->C,V); \    (DA)->C=COMBINE_ALPHA_SUM_V((LA)->C,0,V); \    } \    else \    { \    (D)->C=COMBINE_ALPHA_V((S)->C,(L)->C,(SA)->C,(LA)->C,V); \    (DA)->C=COMBINE_ALPHA_SUM_V((LA)->C,(SA)->C,V); \    } \
pike.git/src/modules/Image/layers.c:726:   **! and is multiplied with the alpha channel.   */      static void image_layer_set_alpha_value(INT32 args)   {    float f;    get_all_args("Image.Layer->set_alpha_value",args,"%F",&f);    if (f<0.0 || f>1.0)    SIMPLE_BAD_ARG_ERROR("Image.Layer->set_alpha_value",1,"float(0..1)");    THIS->alpha_value=f; +  pop_n_elems(args); +  ref_push_object(THISOBJ);   }      static void image_layer_alpha_value(INT32 args)   {    pop_n_elems(args);    push_float(THIS->alpha_value);   }      /*   **! method object set_mode(string mode)