[racket] Generating svg-images rather than png-images from Scribble

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Oct 14 13:40:46 EDT 2013

The relevant method is `render-part`. The `d` argument to the method is
a part.

In the same way that `current-version` is parameterized by extracting a
version from the style properties of `d` (see the inherited
implementation of `extract-version` from "base-render.rkt"), you could
set the parameter that controls image rendering by looking for
'png-images or 'svg-images in the style properties of `d`.

At Mon, 14 Oct 2013 19:36:23 +0200, Jens Axel Søgaard wrote:
> I took a look at the HTML renderer and have to admit, that I can't see
> the forest for the trees.
> 
> 2013/10/14 Matthew Flatt <mflatt at cs.utah.edu>:
> > At Mon, 14 Oct 2013 18:10:18 +0200, Jens Axel Søgaard wrote:
> >> The parameter that controls whether pngs or svgs are being used is called
> >> current-html-render-pict-as. I am not completely sure the way I added
> >> the parameter is The Right Way, so speak up, if there is another way.
> >
> > I think the HTML renderer should recognize an 'svg-images or
> > 'png-images style property on a `part` and adjust the image conversion
> > while rendering that part.
> >
> > That style property could even work as a replacement for the parameter
> > (although a parameter may be needed internally). That is, to change the
> > rendering of a document, a style property could be added to the
> > document to be rendered instead of setting a global parameter.
> >
> 
> 
> 
> -- 
> --
> Jens Axel Søgaard


Posted on the users mailing list.