|
Is there a way to edit Windows
Metafiles?
There are many ways to edit them,
but I don't know if there are BEST ways to do it.
One way is using a photo editing
application like PaintShop Pro or Adobe Photoshop.
One way is following the Microsoft
instructions (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/metafile_0hmb.asp):
Editing
an Enhanced Metafile
To edit a picture stored in an enhanced metafile,
an application must perform the tasks described in
the following procedure.
To edit a picture stored in an enhanced
metafile
- Use hit-testing to capture
the cursor coordinates and retrieve the position
of the object (line, arc, rectangle, ellipse, polygon,
or irregular shape) that the
user wants to alter.
- Convert these coordinates
to logical (or world) units.
- Call the EnumEnhMetaFile
function and examine each metafile record.
- Determine whether a given
record corresponds to a GDI drawing function.
- If it does, determine whether
the coordinates stored in the record correspond
to the line, arc, ellipse, or other graphics element
that intersects the
coordinates specified by the user.
- Upon finding the record
that corresponds to the output that the user wants
to alter, erase the object on the screen that corresponds
to the original record.
- Delete the corresponding
record from the metafile, saving a pointer to its
location.
- Permit the user to redraw
or replace the object.
- Convert the GDI functions
used to draw the new object into one or more enhanced-metafile
records.
- Store these records
in the enhanced metafile.
This is the best I got. Let me know
if this helps.
-Frank Mullins
Send us
your MicroStation tips!
Send us your favorite MicroStation tip to tips@microstationtips.com.
We will give you full credit for the tip and your
peers will look at you with the reverence a MicroStation
guru rightly deserves!
Back | Tips
and How-to's Archive
|
|
 |
|
|
Know a better way to do something or a cool
tip or trick? Click below to let us know
about it.
|
|
|
|
 |
|
|
Submit your name and
e-mail to get the newest MicroStation tips
and tricks delivered directly to your virtual
doorstep.
|
|
|
|
|