Re: Vector Graphics - was MFC and GDI+
- From: "Michael Phillips, Jr." <mphillips53@xxxxxxxxxxxxxxx>
- Date: Wed, 18 Apr 2007 09:42:02 -0400
I understand it now. Perhaps you need to consider another method such as
one of the page description interpreted languages which use the underlying
technology of the printer's operating system to deliver the precision that
you need.
For example, if you download a music score that was published with Adobe's
..pdf description language, the music staves will look correct on the screen
and on the printed page.
These page description languages are written as interpretators using the
underlying chip set of the printer. Instead of an emf vector comprised of
gdi or gdiplus graphics commands, the gdi or gdiplus graphics commands are
translated into interpreted language code that can run on the printer's or
computer's operating system.
"David Webber" <dave@xxxxxxxxxxxxxxxxxxx> wrote in message
news:uE$oSRZgHHA.4552@xxxxxxxxxxxxxxxxxxxxxxx
"Michael Phillips, Jr." <mphillips53@xxxxxxxxxxxxxxx> wrote in message
news:eQHVEiQgHHA.3460@xxxxxxxxxxxxxxxxxxxxxxx
I do not understand why you cannot use vector graphics.
The difficulty is the 5 line music stave - schematically
----------------------
----------------------
----------------------
----------------------
----------------------
On the screen (I'll come to printers in a moment) the smallest
representation (useful for overviews, not for editing details) has 1-pixel
thick lines and a 1 pixel-thick space between them. The next smallest
(useful for simultaneous editing and overview) has 1 pixel thick lines and
a 3-pixel high space between them.
In either of those cases the consequence of using vector graphics and
getting a rounding error such that one line is 1 pixel out from where it
should be, is utterly catastrophic. It destroys the image completely.
[I can see this effect easily - just by opening a Print Preview window!
The resolution of the screen doesn't change but the mapping does.]
When I first wrote the code the new and latest technology was the
wonderful Epson FX80 dot-matrix printer - remember them? :-) Again
absolute pixel accurcay was completely necessary: the occasional line
being drawn one pixel to high or low, would make the music unreadable.
[Remember musicians don't get a chance to go back and re-read it if it
isn't quite clear: they have to get it right first time!]
Nowadays printers generally gave a better resolution, and my experience is
that a slight unevenness in line spacing mostly just makes the music look
a bit less crisp, rather making it completely unreadable. But there are
people who print full orchestral scores on A4 paper (because that's what
their printer has). In this case the music is small and again the
printer resolution starts to become important. Printers are very good and
I can read the results (albeit with a magnifying glass) but I doubt that
would be true with vector graphics.
You say the vector resolution is 0.01mm. At 300dpi (and lot of people
still apparently use that) pixel resolution is 0.0847mm. I don't feel
that is a sufficient safety margin! If you scale to an arbitrary size,
then in general the lines of the 5-line stave will not be separated by an
integral number of pixels. Sooner or later (soon in fact) one of the
staves will end up with unevenly spaced lines, resulting in an image
degradation which according to circumstances may be tolerable, annoying,
or devastating :-(
So for now I'll stick to asking for the printer resolution, and drawing
staves to exact pixels.
This has consequences. For instance if you change printers, the height of
a 5-line stave (my measure of point-size for the music font) can change by
typically 1 pt. But as the same factors affect this as affect the vector
graphics, I'll feel able to use vector graphics perhaps whan it only
changes by 0.1pt :-)
It's a pity. At one stage I thought .emf was going to answer lot of
problems, but it doesn't. In fact if you extract an image of music to
paste into Word, at bitmap constructed at printer resolution seems to work
better than emf. Word is obviously very clever about how it renders
them - it looks better than just a stretchblit!
Dave
--
David Webber
Author MOZART the music processor for Windows -
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm
.
- Follow-Ups:
- Re: Vector Graphics - was MFC and GDI+
- From: David Webber
- Re: Vector Graphics - was MFC and GDI+
- References:
- MFC and GDI+
- From: David Webber
- Re: MFC and GDI+
- From: Michael Phillips, Jr.
- Re: MFC and GDI+
- From: David Webber
- Re: MFC and GDI+
- From: Michael Phillips, Jr.
- Re: MFC and GDI+
- From: Michael Phillips, Jr.
- Re: MFC and GDI+
- From: David Webber
- Re: MFC and GDI+
- From: Michael Phillips, Jr.
- Vector Graphics - was MFC and GDI+
- From: David Webber
- MFC and GDI+
- Prev by Date: Re: Get handle of monitor fails
- Next by Date: Re: Get handle of monitor fails
- Previous by thread: Vector Graphics - was MFC and GDI+
- Next by thread: Re: Vector Graphics - was MFC and GDI+
- Index(es):
Relevant Pages
|