From cc60ccf369cc6ae9f1cffb70ae80ec79c829d7d1 Mon Sep 17 00:00:00 2001 From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org> Date: Fri, 9 Apr 1999 12:20:38 +0200 Subject: [PATCH] doc update Rev: src/modules/Image/encodings/any.c:1.6 Rev: src/modules/Image/pattern.c:1.13 Rev: src/modules/_Image_TTF/image_ttf.c:1.13 --- src/modules/Image/encodings/any.c | 29 +++++++++++++++++++++++++---- src/modules/Image/pattern.c | 6 +++--- src/modules/_Image_TTF/image_ttf.c | 6 +++--- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/modules/Image/encodings/any.c b/src/modules/Image/encodings/any.c index 61b0a4ede6..6add3ea124 100644 --- a/src/modules/Image/encodings/any.c +++ b/src/modules/Image/encodings/any.c @@ -1,9 +1,9 @@ -/* $Id: any.c,v 1.5 1999/04/06 17:24:30 marcus Exp $ */ +/* $Id: any.c,v 1.6 1999/04/09 10:19:51 mirar Exp $ */ /* **! module Image **! note -**! $Id: any.c,v 1.5 1999/04/06 17:24:30 marcus Exp $ +**! $Id: any.c,v 1.6 1999/04/09 10:19:51 mirar Exp $ **! submodule ANY **! **! This method calls the other decoding methods @@ -11,7 +11,7 @@ **! this is. **! **! Methods: -**! <ref>decode</ref>, <ref>decode_trans</ref>, +**! <ref>decode</ref>, <ref>decode_alpha</ref>, **! <ref>_decode</ref> **! **! see also: Image @@ -23,7 +23,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: any.c,v 1.5 1999/04/06 17:24:30 marcus Exp $"); +RCSID("$Id: any.c,v 1.6 1999/04/09 10:19:51 mirar Exp $"); #include "pike_macros.h" #include "operators.h" #include "builtin_functions.h" @@ -40,6 +40,24 @@ void image_gif__decode(INT32 args); void image_pnm_decode(INT32 args); void image_xwd__decode(INT32 args); +/* +**! method mapping _decode(string data) +** method object decode(string data) +** method object decode_alpha(string data) +**! Tries heuristics to find the correct method +**! of decoding the data, then calls that method. +**! +**! The result of _decode() is a mapping that contains +**! <pre> +**! "type":image data type (ie, "image/jpeg" or similar) +**! "image":the image object, +**! "alpha":the alpha channel or 0 if N/A +**! </pre> +**! +**! note +**! Throws upon failure. +*/ + void image_any__decode(INT32 args) { if (args!=1 || sp[-args].type!=T_STRING) @@ -112,7 +130,10 @@ void image_any__decode(INT32 args) return; /* done */ } + goto unknown_format; + default: +unknown_format: error("Unknown image format.\n"); } diff --git a/src/modules/Image/pattern.c b/src/modules/Image/pattern.c index a7e26dd123..ab7917b4be 100644 --- a/src/modules/Image/pattern.c +++ b/src/modules/Image/pattern.c @@ -1,9 +1,9 @@ -/* $Id: pattern.c,v 1.12 1999/03/03 04:49:36 mirar Exp $ */ +/* $Id: pattern.c,v 1.13 1999/04/09 10:20:38 mirar Exp $ */ /* **! module Image **! note -**! $Id: pattern.c,v 1.12 1999/03/03 04:49:36 mirar Exp $ +**! $Id: pattern.c,v 1.13 1999/04/09 10:20:38 mirar Exp $ **! class image */ @@ -368,7 +368,7 @@ void image_turbulence(INT32 args) **! <td>color(red)<br>(same again)</td> **! <td>...red channel<br></td> **! </tr></table> -**! </tr><tr> +**! </tr></tr> **! **! Use with ->grey() or ->color() for one-color-results. **! diff --git a/src/modules/_Image_TTF/image_ttf.c b/src/modules/_Image_TTF/image_ttf.c index 0dccd3b91e..9173850e6f 100644 --- a/src/modules/_Image_TTF/image_ttf.c +++ b/src/modules/_Image_TTF/image_ttf.c @@ -1,12 +1,12 @@ /* - * $Id: image_ttf.c,v 1.12 1999/03/23 20:28:49 per Exp $ + * $Id: image_ttf.c,v 1.13 1999/04/09 10:18:28 mirar Exp $ */ #include "config.h" #include "global.h" -RCSID("$Id: image_ttf.c,v 1.12 1999/03/23 20:28:49 per Exp $"); +RCSID("$Id: image_ttf.c,v 1.13 1999/04/09 10:18:28 mirar Exp $"); #ifdef HAVE_LIBTTF #include <freetype.h> @@ -620,7 +620,7 @@ static void image_ttf_face_make(INT32 args) **! This is the instance of a face, with geometrics, **! encodings and stuff. **! -**! method create(object face) +**! method void create(object face) **! creates a new Instance from a face. */ -- GitLab