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.9 1999/04/23 15:50:41 mirar Exp $ + **! $Id: layers.c,v 1.10 1999/04/23 23:45:27 mirar Exp $   **! class Layer   */      #include "global.h"   #include <config.h>      #include <math.h> /* floor */    - RCSID("$Id: layers.c,v 1.9 1999/04/23 15:50:41 mirar Exp $"); + RCSID("$Id: layers.c,v 1.10 1999/04/23 23:45:27 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:183:    Ad=(Al+(1-Al)*As)      operand layers:    (Ad=(Al+(1-Al)*As))      add Pd=Pl+Ps   subtract Pd=Ps-Pl   multiply Pd=Ps*Pl   divide Pd=Ps/Pl   invmodulo Pd=Ps%Pl (measured in color values) - invsubtract Pd=Pl*Al-Ps - invdivide Pd=Pl/Ps - invmodulo Pd=Pl%Ps (measured in color values) +  + invsubtract Pd=Pl-Ps | keeps alpha + invdivide Pd=Pl/Ps | from below + invmodulo Pd=Pl%Ps (measured in color values) | +    difference Pd=abs(Ps-Pl)   min Pd=min(Ps,Pl)   max Pd=max(Ps,Pl)   bitwise_and Pd=Ps&Pl   bitwise_or Pd=Ps|Pl   bitwise_xor Pd=Ps^Pl         replace channel layers:    (Ad=As)
pike.git/src/modules/Image/layers.c:1153:   #undef L_OPER      #define LM_FUNC lm_subtract   #define L_TRUNC(X) MAXIMUM(0,(X))   #define L_OPER(A,B) ((A)-(int)(B))   #include "layer_oper.h"   #undef LM_FUNC   #undef L_TRUNC   #undef L_OPER    - #define LM_FUNC lm_invsubtract - #define L_TRUNC(X) MAXIMUM(0,(X)) - #define L_OPER(A,B) ((B)-(int)(A)) - #include "layer_oper.h" - #undef LM_FUNC - #undef L_TRUNC - #undef L_OPER -  +    #define LM_FUNC lm_multiply   #define L_TRUNC(X) (X)   #define L_OPER(A,B) CCUT((A)*(int)(B))   #include "layer_oper.h"   #undef LM_FUNC   #undef L_TRUNC   #undef L_OPER      #define LM_FUNC lm_divide   #define L_TRUNC(X) MINIMUM(255,(X))
pike.git/src/modules/Image/layers.c:1185:   #undef L_OPER      #define LM_FUNC lm_modulo   #define L_TRUNC(X) ((COLORTYPE)(X))   #define L_OPER(A,B) ((A)%((B)?(B):1))   #include "layer_oper.h"   #undef LM_FUNC   #undef L_TRUNC   #undef L_OPER    + #define L_USE_SA +  + #define LM_FUNC lm_invsubtract + #define L_TRUNC(X) MAXIMUM(0,(X)) + #define L_OPER(A,B) ((B)-(int)(A)) + #include "layer_oper.h" + #undef LM_FUNC + #undef L_TRUNC + #undef L_OPER +    #define LM_FUNC lm_invdivide   #define L_TRUNC(X) MINIMUM(255,(X))   #define L_OPER(A,B) ((B)/C2F(1+(int)(A)))   #include "layer_oper.h"   #undef LM_FUNC   #undef L_TRUNC   #undef L_OPER      #define LM_FUNC lm_invmodulo   #define L_TRUNC(X) ((COLORTYPE)(X)) - #define L_OPER(A,B) ((B)%(A)) + #define L_OPER(A,B) ((B)%((A)?(A):1))   #include "layer_oper.h"   #undef LM_FUNC   #undef L_TRUNC   #undef L_OPER    -  + #undef L_USE_SA +    #define LM_FUNC lm_difference   #define L_TRUNC(X) ((COLORTYPE)(X))   #define L_OPER(A,B) abs((A)-(B))   #include "layer_oper.h"   #undef LM_FUNC   #undef L_TRUNC   #undef L_OPER      #define LM_FUNC lm_max   #define L_TRUNC(X) ((COLORTYPE)(X))