Skip to content

vgimg dpi, vgsvg origin, and legend alignment

Sebastien Binet requested to merge ctessum:master into master

Created by: ctessum

Hi,

In these changes I fixed a bug in the alignment between the legend keys and their respective thumbnails, and changed the origin in vgsvg to be the middle of the document so that it is consistent with vgimg. When the origin was at the bottom left corner as before, using the draw.Canvas.Crop() method to create subfigures produced incorrect results.

Also, in vgimg, 96 dpi is not sufficient for certain applications, such as print publication, so making 96 dpi a constant limits the usefulness. Instead, I've made dpi an input argument for creating a new canvas, but if backwards compatibility is desired perhaps there could be separate functions for creating a new canvas, some that require dpi to be specified and others that don't.

Merge request reports