mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Add a couple more tests for wx.BitmapBundle
This commit is contained in:
@@ -26,6 +26,24 @@ class bmpbndl_Tests(wtc.WidgetTestCase):
|
||||
b4 = wx.BitmapBundle(wx.Image(pngFile))
|
||||
self.assertTrue( b4.IsOk() )
|
||||
|
||||
def test_BitmapBundleVector(self):
|
||||
bmps = [wx.Bitmap(16,16,32),
|
||||
wx.Bitmap(24,24,32),
|
||||
wx.Bitmap(32,32,32),
|
||||
wx.Bitmap(64,64,32)]
|
||||
bb = wx.BitmapBundle.FromBitmaps(bmps)
|
||||
self.assertTrue( bb.IsOk() )
|
||||
b = bb.GetBitmap((32,32))
|
||||
self.assertTrue(b.IsOk())
|
||||
self.assertEquals(b.GetSize(), wx.Size(32,32))
|
||||
|
||||
def test_BitmapBundle_ImplicitCtor(self):
|
||||
"Ensure that a wx.Bitmap can still be used where a wx.BitmapBundle is needed"
|
||||
bmp = wx.Bitmap(pngFile)
|
||||
btn = wx.Button(self.frame, -1, "Hello")
|
||||
btn.SetBitmap(bmp)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user