Answer the question
In order to leave comments, you need to log in
How to translate MFC from logical to physical coordinates?
Suppose there is a text that is specified by the LOGFONT
structure.
It is written that it is specified in logical units, as I understand it, only the mapping mode affects the transfer from logical to device, and it is also possible to shift the coordinates, i.e. if I don't apply anything then logical unit= device unit?
And what should I do if I use the mapping mode, for example, I compressed Y by 2 times, how can I then pull out this information when choosing a font size?
I draw directly on a 1:1 image, which I then save to a file and I need to set the text height in % of the image height.
And how is this formula explained?
lfHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72);
dc.GetDeviceCaps(LOGPIXELSY)
LOGPIXELSY
Number of pixels per logical inch along the screen height. In a system with multiple display monitors, this value is the same for all monitors.
Number of pixels per logical inch
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question