> Am 29.12.2020 um 22:56 schrieb Garulfo <garu...@azules.eu>: > > Which process would you advice to add « drop shadows » to any kind of metafun > / metapost figures like: > picture p; > p := textext("MetaPost is fun!") shifted (10cm,10cm); > > > My current understanding of the required steps : > > > 1- fill p with the shadow color > > 2- write it to an external metapost file (with savebuffer ?) ready for png > export (outputformat := "png »;) > > 3- with lua, os.execute, and imagemagick prepare the shadow > - extent the png file with a transparent background, to have room for > blurring > - blur it > > 4- import this png in context / Metapost (externalfigure), and center it with > p figure > > 5- shift it according to the desired shadows distance and angle > > 6- apply the initial bounding box of p to the shadow, draw the shadow, draw > the p picture > > > Actually, all this seems long and tedious, and contrasts with the already > existing links between MetaPost / MetaFun and cairo + libpng.
I don’t know if that helps, but I’m using a stack of transparent objects to simulate drop shadows: https://wiki.contextgarden.net/Drop_shadows No pixel images required. But I’d like to have a real text shadow instead of that box shadow. Happy New Year! Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________