ipe icon indicating copy to clipboard operation
ipe copied to clipboard

Non-integer grid size

Open S119349 opened this issue 3 years ago • 1 comments

It is currently not possible to have a grid that is not an integer number of points. E.g., the following declaration in a stylesheet <gridsize name="1mm" value="2.8346456693" /> is silently ignored. Indeed, in the source, we find int iGridSize. Would it be possible to change this to double to allow for different grids?

S119349 avatar Apr 29 '22 10:04 S119349

The problem is that Ipe stores coordinates in points, and there have always been problems with rounding errors when Ipe supported fractional grid sizes (in Ipe 6).

If you want mm- correct drawings, I suggest you draw them as if 3 pts equal 1 mm. Then, when you need the image, you scale it (for instance when including in Latex using \includegraphics) by the factor 1.05833333.

At some point I want to allow coordinates in Ipe files to be mm-correct, with the conversion to PDF points happening automatically when saving in PDF.

otfried avatar Apr 29 '22 18:04 otfried