That is likely not what is happening. These brushes basically use
predefined 8x8 bitmaps to fill the region, so the lines are only a few
pixels apart. When that is rendered on a canvas with a much higher
resolution (= smaller pels) you simply cannot see the individual lines
anymore, unless you use a magnifier. The resulting pattern of tightly
spaced lines on white looks grey to the *** eye.
The problem is that some of the GDI instructions do not scale properly
when you StretchDraw a metafile. Metafiles are really geared towards
containing line drawings and text, any kind of bitmap content has
problems when scaling. You usually have to enumerate the metafile
records manually and modify the drawing code for some of the commands
A way out that you should try is to forget about StretchDraw. When you
compose the metafile, do not use the default MM_TEXT mapping mode. Set
the metafile canvas up using one of the hires mapping modes, e.g.
MM_HIMETRIC or MM_TWIPS. Then draw everything using this mapping modes
logical units (that requires some fiddling when it comes to text
output, since you have to set the metafilecanvas.font.pixelsperinch
property to the correct conversion factor yourself before setting
font.size will work. For MM_TWIPS the value to use would be 1440). When
you render a bitmap StretchDraw it with the appopriate scaling. When
you want to print the metafile set the printer.canvas to the same
mapping mode first and then use canvas.Draw, not StretchDraw.
Unfortunately the VCL tCanvas class was not designed with mapping mode
support in mind, some operations you do on it may get the mapping mode
reset. So if you observe problems check the mapping mode at certain
places in your drawing code. Or do all drawing using *** API
commands, even though that is mucho cumbersome...
Peter Below (TeamB)
Don't be a vampire ( http://www.yqcomputer.com/
use the newsgroup archives :