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

version» Context lines:

pike.git/src/modules/Image/colors.c:1:   /*   **! module Image   **! note - **! $Id: colors.c,v 1.38 2000/08/11 19:28:39 grubba Exp $ + **! $Id: colors.c,v 1.39 2000/08/15 12:43:43 grubba Exp $   **! submodule Color   **!   **! This module keeps names and easy handling   **! for easy color support. It gives you an easy   **! way to get colors from names.   **!   **! A color is here an object, containing color   **! information and methods for conversion, see below.   **!   **! <ref>Image.Color</ref> can be called to make a color object.
pike.git/src/modules/Image/colors.c:172:   **! class Color   **! This is the color object. It has six readable variables,   **! <tt>r</tt>, <tt>g</tt>, <tt>b</tt>, for the <i>red</i>,   **! <i>green</i> and <i>blue</i> values,   **! and <tt>h</tt>, <tt>s</tt>, <tt>v</tt>, for   **! the <i>hue</i>, <i>saturation</i> anv <i>value</i> values.   */      #include "global.h"    - RCSID("$Id: colors.c,v 1.38 2000/08/11 19:28:39 grubba Exp $"); + RCSID("$Id: colors.c,v 1.39 2000/08/15 12:43:43 grubba Exp $");      #include "image_machine.h"      #include <math.h>      #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"
pike.git/src/modules/Image/colors.c:450:    push_int((r*THIS->rgb.r+g*THIS->rgb.g+b*THIS->rgb.b)/(r+g+b));   }      #define MAX3(X,Y,Z) MAXIMUM(MAXIMUM(X,Y),Z)   #define MIN3(X,Y,Z) MINIMUM(MINIMUM(X,Y),Z)      static void image_color_hsvf(INT32 args)   {    double max, min;    double r,g,b, delta; -  double h, s, v; +  double h, s = 0.0, v;       pop_n_elems(args);       if((THIS->rgb.r==THIS->rgb.g) && (THIS->rgb.g==THIS->rgb.b))    {    push_float(0.0);    push_float(0.0);    push_float(COLORL_TO_FLOAT(THIS->rgbl.r));    f_aggregate(3);    return;