Board index » Visual Studio » printing and SetMapMode
|
TexaCowboy
|
|
TexaCowboy
|
printing and SetMapMode
Visual Studio310
Hi, I am drawing some icons on my screen.. these show up very small on the printer, because an icon of 32x32 pixels on a high resolution printer is tiny. How can I make the icon/bitmap appear the same size (percentage of screen) on paper? SetMapMode(MM_ANISOTROPIC) ? En then? I don't understand the SetViewportOrig and ScreenOrig functions.. Lisa - |
| kochkarev
Registered User |
Mon Nov 08 03:05:19 CST 2004
Re:printing and SetMapMode
"Lisa Pearlson" <no@spam.plz>wrote in message news:<OaZIgUTxEHA.2016@TK2MSFTNGP15.phx.gbl>...
QuoteHi, QuoteEn then? I don't understand the SetViewportOrig and ScreenOrig functions.. StretchBlt to output your icons. Also you will have to translate your graphic objects coordinates manually so that you obtain WYSIWYG on your printer. The SetViewport and SetWindow functions are simple - they define the coefficients of the linear equation: Xp = Xpo + CXp/CXn * (Xn - Xno), .. the same for y, where Xp - printer native coordinate, Xpo - printer origin (viewport origin) Xn - the 'native' coordinate, the one you pass to your graphic funcs Xno - window origin CXp - viewport extension CXn - window extension Note, that your icon will not look fine, because modern printers have large resolutions (like 1200 dpi), while modern displays have 75 or 92 dpi only. So one screen pixel is transformed to 16 printer pixels and the result is not very good. A better way is to use curves for printing (like fonts do) and Bezier curves are the one that fit the task. Of course, I don't know the aim of your program, but it may be worthy to draw your icons in vector format (say, emf or wmf). - |
