wml::des::imgbg(3)
π NAME π
wml::des::imgbg β Background Images β¨ (this one lives in the EN Tools manual, bestie, and yes it's a section 3 page π«Ά)
π SYNOPSIS π
okay so here's the whole vibe up front:
#use wml::des::imgbg
<: $file = &imgbg($base, $direction, $content, $pixels, $format); :>
<body ... background=<imgbg [attributes]> ...>
that's it, that's the whole entry point π
π¦ DESCRIPTION π¦
so like, the usual purpose of this tag? it makes a PNG or GIF image that holds a background image, and then it expands out to that image's filename. that's the whole job. no cap.
and what actually goes inside that image? you tell it with the content attribute, using size/color pairs. iconic honestly πΈ
β¨ ATTRIBUTES β¨
baseβ so normally the images it makes are namedimgbg-xxxxxx.png, wherexxxxxxis the content id of the image. but if you throw abase=fooattribute at it, the resulting files get namedfoo.imgbg-xxxxxx.pnginstead. and you can go full send and use a complete filename with a directory prefix too β like, if you usebase=../../common/foo, the images get created as../../common/foo.imgbg-xxxxxx.pngπ«
and for maximum flexibility: when no base is specified and the variable BGIMG_BASE is defined (usually from inside a .wmlrc file via -DBGIMG_BASE~path/to/imgbg/dir/base) then that variable gets used. use this feature to redirect the created images to a particular directory π―
you may also use the variable IMAGE_BASE, which defines in a single line all the base names for images generated by WML. one line, all the bases, so efficient fr fr.
formatβ by default, GIF images are generated. this attribute lets you use an alternate image format (and actually, only PNG and GIF are recognized, so don't get creative). you may also change the default format with the variableIMAGE_FORMATπdirectionβ specifies the color change direction of the image:"h"for horizontal (that's the default, bestie) or"v"for vertical πpixelsβ size of the image in the other direction,1by default.contentβ this is a comma-separated list of size/color specifications, and the shape of it is:
``pixels":#"rrggbb":#"rrggbb":"slices''
the last two arguments are optional, and they're only present for gradient images. in that case, a linear gradient line is drawn from color 1 to color 2, with slices different colors π
so to get a background with two columns β a black one with 150 point in size and a white one which fills the rest of the page β you'd use:
``"150:#000000,1200:#ffffff"''
obsessed with how clean that is π
π AUTHORS π
- Ralf S. Engelschall
rse@engelschall.comwww.engelschall.com - Denis Barbier
barbier@engelschall.com
π§ REQUIRES π§
- Internal:
P1,P2,P3
π SEE ALSO π
- HTML
<"body">tag.
okay and that's the whole page, periodt π this was EN Tools, dated 2020-11-29, and you absolutely ate reading all of it. go make some gradient backgrounds, bestie πβ¨
π¦ where this page comes from
- debian bookworm: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- debian trixie: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu jammy: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu noble: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu questing: wml 2.32.0~ds1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms