I am trying to replay a metafile that has been saved on the disk. It works except for one thing. I cannot figure out how to get a proper scaling. If I don't do anything, when drawing the bitmap on the screen from the metafile, it appears much, much bigger than it should. Well, given that the window size is 100*100, it never exceeds that on the screen, but it means only a small part of a much bigger bitmap is visible.
Here is a code sample that reproduces the problem.
I am trying to calculate this ratio that would display a proper 100*100 pixels bitmap on the screen.
I have tried to play with different mappings, including by applying mappings to the metafile. On my PC at least, the correct ratio would be around 39, but using a hard coded value is not satisfactory as it does not give the same result on someone else's PC.
Elrond A chess genius is a human being who focuses vast, little-understood mental gifts and labors on an ultimately trivial human enterprise.
-- George Steiner