Hi,
I pushed an update. Apart from a few fixed (most already mentioned on
the list) the main addition is in some experiments with metapost and
bitmaps. We (Keith, Mikael, me) will follow up on that later when we're
done / satisfied with experimenting but the code is already there.
Here's a teaser for Hraban who loves drop shadows, just run:
meta-imp-noise.mkxl
Another nice test is this:
\startMPcode
triplet bm ; bm := loadbytemapfromfile(1, "mill.png") ;
newbytemap 2 of (1,1,1);
downsamplebytemap(1,2,2);
draw unitsquare
bytemapscaled 1 xsized .5 TextWidth
withbytemap 1
;
draw unitsquare
bytemapscaled 1 xsized .5TextWidth
shifted (.5TextWidth,0)
withbytemap 2
;
\stopMPcode
and here's another teaser:
\startTEXpage[offset=.5ts]
\startluacode
local round = math.round
local random = math.random
function MP.bw_inverse(x,y,s)
return 255 - s
end
function MP.bw_darker(x,y,s)
return 0.8 * s
end
function MP.bw_grain(x,y,s)
return s - 25 + random(50)
end
\stopluacode
\startMPcode
triplet bm ; bm := loadbytemapfromfile(1, "mill.png") ;
copybytemap 1 to 2;
copybytemap 1 to 3;
copybytemap 1 to 4;
draw lmt_bytemap [
bytemap = 1,
] bytemapscaled 1 xsized .25TextWidth ;
draw lmt_bytemap [
bytemap = 2,
colorfunction = "bw_inverse",
] bytemapscaled 1 xsized .25TextWidth xshifted .25TextWidth;
draw lmt_bytemap [
bytemap = 3,
colorfunction = "bw_darker",
] bytemapscaled 1 xsized .25TextWidth xshifted .50TextWidth;
draw lmt_bytemap [
bytemap = 4,
colorfunction = "bw_grain",
] bytemapscaled 1 xsized .25TextWidth xshifted .75TextWidth;
\stopMPcode
\stopTEXpage
to keep him busy ... have fun,
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________