pike.git
/
src
/
modules
/
Image
/
colors.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/Image/colors.c:1:
/* **! module Image **! note
-
**! $Id: colors.c,v 1.
26
1999/07/
15
17
:
49
:
27
hubbe
Exp $
+
**! $Id: colors.c,v 1.
27
1999/07/
23
21
:
37
:
40
mirar
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:130:
**! array grey=Array.filter(cs,lambda(object c) { return c->s==0; }); **! array colored=cs-grey; **! **! sort(grey->v,grey); **! sort(Array.map(colored,lambda(object c) **! { **! return (c->h*50-c->s)*10+c->v; **! }),colored); **! **! Array.map(({orig}),color_info);
-
**! write(
mktag(
"
hr
")
)
;
+
**! write("
\240
");
**! Array.map(({grey}),color_info);
-
**! write(
mktag(
"
hr
")
)
;
+
**! write("
\240
");
**! Array.map(colored/8.0,color_info); **! } **! **! </execute> **! </add_appendix> **! **! see also: Image.Color.Color->name, Image.Color.Color->rgb, colors **! **! added: **! pike 0.7
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.
26
1999/07/
15
17
:
49
:
27
hubbe
Exp $");
+
RCSID("$Id: colors.c,v 1.
27
1999/07/
23
21
:
37
:
40
mirar
Exp $");
#include "image_machine.h" #include <math.h> #include "stralloc.h" #include "pike_macros.h" #include "object.h" #include "constants.h" #include "interpret.h"