Lots of wx namespace updates for the wx.lib package and the demo from
Jeff Grimmett with some tweaks and changes from Robin git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -1,17 +1,22 @@
 | 
			
		||||
 | 
			
		||||
# images converted with wxPython's img2py.py tool
 | 
			
		||||
 | 
			
		||||
from wxPython.wx import wxImageFromStream, wxBitmapFromImage
 | 
			
		||||
import cStringIO
 | 
			
		||||
# 12/14/2003 - Jeff Grimmett (grimmtooth@softhome.net)
 | 
			
		||||
#
 | 
			
		||||
# o 2.5 compatability update.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
import  cStringIO
 | 
			
		||||
import  wx
 | 
			
		||||
 | 
			
		||||
##----------- Common Functions
 | 
			
		||||
 | 
			
		||||
def GetBitmap(ImageData):
 | 
			
		||||
    return wxBitmapFromImage(GetImage(ImageData))
 | 
			
		||||
    return wx.BitmapFromImage(GetImage(ImageData))
 | 
			
		||||
 | 
			
		||||
def GetImage(ImageData):
 | 
			
		||||
    stream = cStringIO.StringIO(ImageData)
 | 
			
		||||
    return wxImageFromStream(stream)
 | 
			
		||||
    return wx.ImageFromStream(stream)
 | 
			
		||||
 | 
			
		||||
##----------- Image Data
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user