Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-12

How to create a wmf file

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Santhoff
to Dennis
Dennis wrote
I have a custom panel that draws lines and rectangles on its canvas. How can I draw the same things on the canvas of a Windows Metafile canvas so I can save the panel display as a wmf file? Thanks a lot.

If you are on Windows fpvectorial seems to be able to write wmf:

http://wiki.lazarus.freepascal.org/TAChart_documentation/uk#WMF_drawer

FpVectprial is included with Lazarus. See there for a start:

http://wiki.lazarus.freepascal.org/fpvectorial

For other OS you would need to do wmf writing code yourself, iirc it is a rather simple format having drawing items (e.g. Line) and coordinates for doing so.

Things get a bit more complicated for EMF or EMF+:

https://en.wikipedia.org/wiki/Windows_Metafile
https://msdn.microsoft.com/en-us/library/cc250370.aspx

Have fun,
Marc

Marc Santhoff

Reply by email