R.Wieser
2021-03-19 13:05:46 UTC
Hello all,
I've written a small program using GDI / GDI+ to draw OpenStreetMap data
onto an image and save that. While doing that I thought I could use GDIs
scaling and translation to have draw the data at the 0,0 point and fitting
the image.
Alas, that did not quite want to work, as provided values where quite small
but with a largish offset, causing small changes to disappear into the
limited precision a 32-bit float has.
Question: is there a way I can tell GDI to use 64-bit numbers ? If not
another 2D drawing method available that will give me a better precision ?
I've just been looking at DirectDraw, but it looks to be carried by GDI(+),
meaning it likely also uses 32-bit floats ....
Regards,
Rudy Wieser
I've written a small program using GDI / GDI+ to draw OpenStreetMap data
onto an image and save that. While doing that I thought I could use GDIs
scaling and translation to have draw the data at the 0,0 point and fitting
the image.
Alas, that did not quite want to work, as provided values where quite small
but with a largish offset, causing small changes to disappear into the
limited precision a 32-bit float has.
Question: is there a way I can tell GDI to use 64-bit numbers ? If not
another 2D drawing method available that will give me a better precision ?
I've just been looking at DirectDraw, but it looks to be carried by GDI(+),
meaning it likely also uses 32-bit floats ....
Regards,
Rudy Wieser