winapi - Change the unit for setting position in TextOut, C++ -


i'm working on printing plugin c++, , starting working textout print text want. works great, apparently, positions textout uses params in pixels. there way set them in cm or mm? or other?.

well, it's pretty simple. coordinates not in pixels, in coordinates of mapping mode. happens default mapping mode of dc mm_text has each coordinate unit 1 pixel on device.

change mapping mode using setmapmode() coordinate system prefer use. can play window extents, viewport extents, , origins customize want. might want @ documentation setmapmode() , mm_lometric (or mm_himetric) mapping mode.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -