Roxen.git
/
server
/
modules
/
graphics
/
gbutton.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/modules/graphics/gbutton.pike:18:
// icon-data -- inline icon data // align -- left|center|right text alignment // align-icon -- left|center-before|center-after|right icon alignment // valign-icon -- above|middle|below icon vertical alignment // >Button text</gbutton> // // Alignment restriction: when text alignment is either left or right, icons // must also be aligned left or right.
-
constant cvs_version = "$Id: gbutton.pike,v 1.
60
2000/09/
10
16
:
37
:
49
nilsson
Exp $";
+
constant cvs_version = "$Id: gbutton.pike,v 1.
61
2000/09/
19
12
:
58
:
46
per
Exp $";
constant thread_safe = 1; #include <module.h> inherit "module"; roxen.ImageCache button_cache; constant module_type = MODULE_TAG; constant module_name = "GButton"; constant module_doc =
Roxen.git/server/modules/graphics/gbutton.pike:623:
l-=({ 0 }); if( sizeof( l ) ) { object q = Image.lay( l ); q->set_offset( button_layers[0]->xsize()+ button_layers[0]->xoffset(),0); button_layers += ({ q }); } }
-
button_layers = ({Image.lay( button_layers )});
-
-
// fix transparency (somewhat)
+
if( !equal( args->pagebg, args->bg ) )
-
return
button_layers
+
-
({
-
Image
.
Layer(([
-
"fill":args->pagebg,
-
"alpha":button_layers[0]->alpha()->invert(),
-
]))
-
}
);
+
{
+
//
FIXME:
fix transparency (somewhat)
+
//
this
version
totally
destroys
the
alpha
channel
of
the
image,
+
//
but
that's
sort
of
the
intention
.
The
reason
is
that
+
//
the
png
images
are
generated
without
alpha.
+
//
+
//
however,
it
would
be
nice
to
have
transparency
with
gif
images.
+
return
({
Image.Layer(([
"fill":args->pagebg,
]))
})
+
button_layers;
+
}
return button_layers; } mapping find_internal(string f, RequestID id) { return button_cache->http_file_answer(f, id); }