On a related problem, does anyone know why the PlayRecordCallback
parameter to the EnumerateMetafile callback is always null?
Microsoft's own sample code for the Graphics.EnumerateMetafileProc
Delegate uses the PlayRecord to draw each metafile record; the sample
doesn't work, however. I presume this is related to the callbackData
parameter to Graphics.EnumerateMetafileProc; the documentation says to
pass in IntPtr.Zero, but I suspect that it should really recieve a
callback pointer. However, the PlayRecordCallback delegate doesn't
match Metafile.PlayRecord's signature (byte [] data instead of IntPtr
data). I'd really prefer the IntPtr form, since then I wouldn't have
to Marshal.Copy the data from the IntPtr data from the
EnumerateMetafileProc delegate into a byte [] array.
Any insight would be appriciated.
Thanks,
Robert W. Grubbs
The new EMF+ records are not currently documented. I am checking to
see if there exists any documentation which I can share with you.
If there is, I'll post something here. I expect that would be later
today or early next week.
I think your other question about the callback being null is more
related to System.Drawing and not the underlying GDI+, so it would
be best asked on the microsoft.public.dotnet.framework.drawing
newsgroup. I have experienced that behavior myself, but have not
yet had the bandwidth to solve it.
Thanks,
- John
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.
Me too - I posted such a question here about a month or so ago. There
are a couple of people here also interested in the answer (if there is
one!).
--
Dr. Michael Atkinson, GeoQuest Simulation Software Development
Note that email address in the headers is cleared monthly and NOT read.
Contact me at matkin...@LOCKabingdon.geoquest.slb.com
(firstly removing the CAPS LOCK).
By the way, this is the microsoft.public.dotnet.framework.drawing
group I'm posting in, so I'm not sure what you meant.
While we're on the subject of metafiles, I've had other troubles:
1. With non-default scaling modes. Set a graphics surface to
PageUnit=GraphicsUnit.Inch, then DrawImage and DrawRectangle to the
same rectangle position on the surface. The metafile winds up smaller
than the rectangle it was drawn in.
2. Metafile.EmfHeader isn't public, yet Metafile.WmfHeader is. I'd
really like to get some of the EmfHeader data out without using
reflection to bypass the protection level.
Thanks,
Robert Grubbs
JHor...@online.microsoft.com (John Hornick [MS]) wrote in message news:<wrkK$rMYCHA.1336@cpmsftngxa07>...
"John Hornick [MS]" <JHor...@online.microsoft.com> wrote in message
news:wrkK$rMYCHA.1336@cpmsftngxa07...