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
Post a Comment