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.
76
2008/
05
/
29
10
:
11
:
15
grubba
Exp $
+
|| $Id: colors.c,v 1.
77
2008/
12
/
13
08
:
23
:
45
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:1512:
{ push_int( THIS->rgbl.r ); push_int( THIS->rgbl.g ); push_int( THIS->rgbl.b ); f_aggregate( 3 ); } static void image_color__decode( INT32 args ) { struct svalue *a;
-
int r, g, b;
+
if( Pike_sp[-1].type != PIKE_T_ARRAY || Pike_sp[-1].u.array->size != 3 ) Pike_error("Illegal argument to _decode\n"); a=Pike_sp[-1].u.array->item; THIS->rgbl.r = a[0].u.integer; THIS->rgbl.g = a[1].u.integer; THIS->rgbl.b = a[2].u.integer; RGBL_TO_RGB(THIS->rgb,THIS->rgbl); pop_stack(); }