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:
/* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: colors.c,v 1.
70
2003
/
12
/
09
08
:
11
:
01
nilsson Exp $
+
|| $Id: colors.c,v 1.
71
2004
/
01
/
22
23
:
10
:
37
nilsson Exp $
*/ /* **! module Image **! submodule Color **! **! This module keeps names and easy handling **! for easy color support. It gives you an easy **! way to get colors from names. **!
pike.git/src/modules/Image/colors.c:184:
**! 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.
70
2003
/
12
/
09
08
:
11
:
01
nilsson Exp $");
+
RCSID("$Id: colors.c,v 1.
71
2004
/
01
/
22
23
:
10
:
37
nilsson 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:938:
**! **! returns 1 or 0 **! see also: rgb, grey, name **! note: **! The other datatype (not color object) must be to the right! */ static void image_color_equal(INT32 args) { if (args!=1)
-
Pike_error("Image.Color.Color->`==: illegal number of
arguments
");
+
Pike_error("Image.Color.Color->`==: illegal number of
arguments\n
");
if (sp[-1].type==T_OBJECT) { struct color_struct *other; other=(struct color_struct*) get_storage(sp[-1].u.object,image_color_program); if (other&& other->rgbl.r==THIS->rgbl.r && other->rgbl.g==THIS->rgbl.g && other->rgbl.b==THIS->rgbl.b)
pike.git/src/modules/Image/colors.c:1241:
((C)>='a' && (C)<='f')?(C)-'a'+10: \ ((C)>='A' && (C)<='F')?(C)-'A'+10:-1) static void image_get_color(INT32 args) { struct svalue s; int n; static char *callables[]={"light","dark","neon","dull","bright"}; if (args!=1)
-
Pike_error("Image.Color[]: illegal number of args");
+
Pike_error("Image.Color[]: illegal number of args
.\n
");
if (!colors) make_colors(); if (sp[-1].type==T_STRING) { mapping_index_no_free(&s,colors,sp-1); if (s.type==T_OBJECT) { pop_stack();