all groups > dotnet drawing api > april 2008 >
You're in the

dotnet drawing api

group:

DrawDriverString EMF Record


Re: DrawDriverString EMF Record Michael Phillips, Jr.
4/21/2008 11:45:02 AM
dotnet drawing api:
[quoted text, click to view]

Microsoft has not documented any of the EMF+ data formats.

The best resource for the undocumented EMF+ data is here:
http://www.aces.uiuc.edu/~jhtodd/Metafile/


[quoted text, click to view]

DrawDriverString EMF Record elziko
4/21/2008 4:07:02 PM
Hi,

I am trying to use Graphics.EnumerateMetafile in order to inspect any
DrawDriverString EMF records in a metafile and then change the string that
is contained within the record before using Metafile.PlayRecord to draw the
modified record.

Unfortunately I have found no useful documentation on DrawDriverString.
Using the following code:

dataArray = New Byte(dataSize) {}
Marshal.Copy(data, dataArray, 0, dataSize)

....I end up with an array, 'dataArray', that represents this record.
However, I can find no good way of knowing how to understand the data in the
array or how to reconstruct it myself.

By comparing the array for very similar records I can now discover the
number of characters and the actual string contained within a record.
However, overwriting this character count and inserting my substituted
characters does not work. When I play my edited record I get either nothing
or nonsense.

Does anyone know anything about the format of the DrawDriverString data? Or
any links to some documentation - hopefully .NET based!

TIA

AddThis Social Bookmark Button