Re: Change resulution (DPI) of a device context
From: Schmidt (sss_at_online.de)
Date: 01/26/05
- Next message: Warren Galyen: "Re: reading photoshop layers"
- Previous message: Simon: "Re: How to show waveform in vb"
- In reply to: Martin Enke: "Change resulution (DPI) of a device context"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 Jan 2005 16:36:01 +0100
"Martin Enke" <martin-enke@online.de> schrieb im Newsbeitrag
news:uMd10pyAFHA.3084@TK2MSFTNGP11.phx.gbl...
> When creating a enhanced meta file the resolution is set to the resolution
> of the device context.
> Now, I have two ways to influence the resolution: Choosing a dc compatible
> to the display which meens 96 DPI or choosing a dc compatible to a
printer.
> I need a printer compatible meta file, so it would be ok if there wheren't
> some users who have no printer!
Creating the MetaFile compatible to the current ScreenDC (Param to Null in
the CreateEnhMetaFile-Function) is the only way that does work on every PC.
Typically the Resolution is 96dpi and the Fonts < 9Pt look terrible, if
played against a Printer-hdc.
There was no way, to significant enhance the quality of the Font-Playback
with SetViewPortExt in combination with SetWindowExt.
So we ended up with a simple but effective solution:
All our drawing-functions go through a class-layer and work on
millimeter-Basis.
So it was easy for us, to define (in addition to the mm-Constants) a global
ScaleConstant and enhance the resolution this way.
Our Himetric-Rect (normally A4 with 21000x29700) used in CreateEnhMetaFile
was enlarged by this factor (4 works good, so we calculated 84000x118800).
All Drawing-Functions respect this additional factor now and draw factor 4
larger Rectangles, Fonts, etc.
Aspect-Ratio is the same, so playback on the Printer-hdcs works with no
problems and much better rendered fonts.
Only drawback is, that the so created *.emf-files show a size in
3rd-party-apps, wich equals the A2-Format.
For us there was no problem, since we use our Report-Format (wich is
additionally compressed with zlib) only inside our own Apps.
Olaf
- Next message: Warren Galyen: "Re: reading photoshop layers"
- Previous message: Simon: "Re: How to show waveform in vb"
- In reply to: Martin Enke: "Change resulution (DPI) of a device context"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|