On Di, 2015-12-01 at 19:11 +0800, 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 <m.santh...@web.de> -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus