Phoenix: MetaFileDC

31 views
Skip to first unread message

Dietmar Schwertberger

unread,
Nov 1, 2015, 9:16:08 AM11/1/15
to wxpytho...@googlegroups.com
Hi!

I'm trying to convert my application from Python 2.7 with wxPython 2.8 to
3.4.3 with Phoenix.
I'm very pleased that the application needed only minor changes.
What's missing from Phoenix, though, is the wxMetaFileDC.So I had a look and
in wxWidgets it's nowcalled wxMetafileDC (with the f in lower case).

So I had a try and it's not too hard to get wxMetafileDC and the
required wxMetafile built.
The required etg/dcmetafile.pyand etg/metafile.pyare similar to e.g.
etg/dcmemory.py and
'demetafile' and 'metafile' needed to be added to etg/_core.py

The only problem was that I'm getting an error about
wxMakeMetafilePlaceable:

sip: sip/gen/_core.sip:85: MakeMetafilePlaceable() has overloaded
functions with the same Python signature

The two versions I found are these:
bool wxMakeMetafilePlaceable(const wxString& filename, float scale)
bool wxMakeMetafilePlaceable(const wxString& filename, int x1, int y1,
int x2, int y2, float scale, bool useOriginAndExtent)

As I did not know how to handle this, I addded to metafile.py:
module.find("wxMakeMetafilePlaceable").ignore()

Still, I got references to the function in the metafile.sip and
sip_corecmodule.cpp.
After manually deleting the references the build succeeded and the
wxMetafileDC worked as expected.

How can I either fix or remove wxMakeMetafilePlaceable?
The I could eventually prepare a pull request.

Regards,

Dietmar

(Sorry for posting to -users, but email subscription to -dev does not
seem to work.)


Dietmar Schwertberger

unread,
Nov 13, 2015, 6:43:45 PM11/13/15
to wxpytho...@googlegroups.com
Am 01.11.2015 um 15:16 schrieb Dietmar Schwertberger:
> I'm trying to convert my application from Python 2.7 with wxPython 2.8 to
> 3.4.3 with Phoenix.
> I'm very pleased that the application needed only minor changes.
> What's missing from Phoenix, though, is the wxMetaFileDC.So I had a
> look and
> in wxWidgets it's nowcalled wxMetafileDC (with the f in lower case).
For information: a pull-request is now on GitHub. So if anyone needs
MetafileDC, just download it. Please note that the spelling has changed.

Regards,

Dietmar
Reply all
Reply to author
Forward
0 new messages