From 0e4e601244a55186ea9aab4774f77c0a3216aff4 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 4 Oct 2006 03:28:49 +0000 Subject: [PATCH] Save a reference to the DC git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_graphics.i | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wxPython/src/_graphics.i b/wxPython/src/_graphics.i index 848dc43bde..a0bb9caade 100644 --- a/wxPython/src/_graphics.i +++ b/wxPython/src/_graphics.i @@ -230,6 +230,8 @@ public: // wxGraphicsContext() This is also an ABC, use Create to make an instance... virtual ~wxGraphicsContext(); + %pythonAppend Create + "val.__dc = args[0] # save a ref so the other dc will not be deleted before self"; static wxGraphicsContext* Create( const wxWindowDC& dc); // creates a path instance that corresponds to the type of graphics context, ie GDIPlus, cairo, CoreGraphics ... @@ -437,6 +439,8 @@ public: class wxGCDC: public wxDC { public: + %pythonAppend wxGCDC + "self.__dc = args[0] # save a ref so the other dc will not be deleted before self"; wxGCDC(const wxWindowDC& dc); //wxGCDC(); virtual ~wxGCDC(); -- 2.45.2