Jouke Visser


Wx::Metafile - Implementation of the wxMetafile class of wxWindows


        my $mf = Wx::Metafile->new('./test.emf');
        # if it loads OK
        if ($mf->Ok)
                # We create an empty bitmap
            $bmp = Wx::Bitmap->new(100,100);
            # And a temporary DC
            $tmpdc = Wx::MemoryDC->new();
            # Everything we do in the DC changes the bitmap
                # We 'play' it inside the DC
                $mf->Play($tmpdc, Wx::Rect->new(0,0,100,100));


See for more information the wxPerl documentation that can be downloaded from the wxPerl website (, which also contains the documentation for this class.

Mind you: Wx::Metafile works only on Win32 platforms. It won't do anything on other platforms. Although it's possible to configure wxWindows to support WMF's instead of EMF's, the Windows Metafile support in wxWindows is broken, and only Enhanced Metafiles will work.


        Jouke Visser


Copyright (c) 2003 Jouke Visser. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.