Roxen.git/
server/
modules/
graphics/
graphic_text.pike
Branch:
Tag:
Non-build tags
All tags
No tags
1998-08-26
1998-08-26 17:48:03 by Per Hedbor <ph@opera.com>
39af1afe6e6e71aa24ad4ebe7cd20727488536ec (
52
lines) (+
22
/-
30
)
[
Show
|
Annotate
]
Branch:
5.2
rewrote the tag handling in gtext
Rev: server/modules/graphics/graphic_text.pike:1.147
1:
-
constant cvs_version="$Id: graphic_text.pike,v 1.
146
1998/08/26
14
:
34
:
14
wellhard
Exp $";
+
constant cvs_version="$Id: graphic_text.pike,v 1.
147
1998/08/26
17
:
48
:
03
per
Exp $";
constant thread_safe=1; #include <module.h>
57:
"number of hours they are removed.");
+
defvar("colorparse", 1, "Parse tags for document colors", TYPE_FLAG,
+
"If set, parse the specified tags for document colors.");
+
defvar("colorparsing", ({"body", "td", "layer", "ilayer", "table"}), "Tags to parse for color", TYPE_STRING_LIST,
64:
"This will affect documents without gtext as well as documents " "with it, the parsing time is relative to the number of parsed " "tags in a document. You have to reload this module or restart "
-
"roxen for changes of this variable to take effect.");
+
"roxen for changes of this variable to take effect."
, 0,
+
lambda(
)
{return !query("colorparse")
;
});
defvar("colormode", 1, "Normalize colors in parsed tags", TYPE_FLAG, "If set, replace 'roxen' colors (@c,m,y,k etc) with "
-
"'netscape' colors (#rrggbb). Setting this to off will
make
the "
+
"'netscape' colors (#rrggbb). Setting this to off will
lessen
the "
"performance impact of the 'Tags to parse for color' option quite"
-
" dramatically. You can try this out with the <gauge> tag.");
+
" dramatically. You can try this out with the <gauge> tag."
,
+
0, lambda(
)
{return !query("colorparse")
;
});
-
// defvar("notspeedy", 0, "Automaticaly detect colors in tables",
-
// TYPE_FLAG,
-
// "If this flag is set, the tags 'table', 'th', 'tr', 'td', 'font'"
-
// " 'layer' and 'ilayer'"
-
// " will be parsed to automatically detect the colors of"
-
// " a document. This will slow down the parser in a noticeable way, "
-
// "but it will be easier to use <gtext> since the colors "
-
// "will almost always have the correct default values");
-
-
// defvar("body", 1, "Automatically detect colors in the <body> tag",
-
// TYPE_FLAG,
-
// "If this flag is not set, the 'body' tag"
-
// " will <b>not</b> be parsed to automatically detect the colors of "
-
// " a document. You will then have to specify all colors in all calls "
-
// " to <gtext>");
-
+
defvar("deflen", 300, "Default maximum text-length", TYPE_INT|VAR_MORE, "The module will, per default, not try to render texts " "longer than this. This is a safeguard for things like "
107:
"Append .gif to all images made by gtext. Normally this will " "only waste bandwidth");
+
#ifdef TYPE_FONT // compatibility variables... defvar("default_size", 32, 0, TYPE_INT,0,0,1);
1588:
mapping query_tag_callers() { mapping tags = ([ "gtext-id":tag_gtext_id]);
+
if(query("colorparse"))
foreach(query("colorparsing"), string t) { switch(t)