Roxen.git/
server/
modules/
graphics/
graphic_text.pike
Branch:
Tag:
Non-build tags
All tags
No tags
1999-05-25
1999-05-25 09:48:17 by Per Hedbor <ph@opera.com>
b83b31df932f46c81aee9ac668a5e3cdb90b21c8 (
20
lines) (+
5
/-
15
)
[
Show
|
Annotate
]
Branch:
5.2
Bugfixes to <gtext split>
Rev: server/modules/graphics/graphic_text.pike:1.176
1:
-
constant cvs_version="$Id: graphic_text.pike,v 1.
175
1999/05/
19
07
:
07
:
09
peter
Exp $";
+
constant cvs_version="$Id: graphic_text.pike,v 1.
176
1999/05/
25
09
:
48
:
17
per
Exp $";
constant thread_safe=1; #include <config.h>
558:
string orig_text = text; object img;
-
m_delete( args, "text" );
-
-
if(!sizeof(args))
-
{
-
args=(["fg":"black","bg":"white","notrans":"1"]);
-
text="Please reload this page";
-
}
-
//werror("Not cached: %O -> %O\n", key, text);
-
//werror("In cache: %O\n", sort(indices(cache->cache)));
-
+
if(!args->verbatim) // typographically correct... { text = replace(text, nbsp, " ");
877:
if(arg->split) {
-
if (
sizeof
(split=arg->split)
!
=
1
)
+
if ((split=arg->split) =
=
"split"
)
split = " "; m_delete(arg,"split"); }
929:
arg->text = word; string fn = image_cache->store( arg ); mapping size = image_cache->metadata( fn, id, 1 );
-
+
mapping tag = ([ "alt":(arg->alt||word),
937:
]); if( size ) {
-
tag->width = size->xsize;
-
tag->height = size->ysize;
+
tag->width
=
(string)
size->xsize;
+
tag->height =
(string)
size->ysize;
} res += ({ make_tag( "img", tag )+" " }); }