#17325: wx.Bitmap(x, y) and wx.Bitmap.Create(x, y) vs. wx.EmptyBitmap(x, y)
-------------------------+--------------------
Reporter: cgrohmann | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: wxPython | Version: 3.0.2
Keywords: | Blocked By:
Blocking: | Patch: 0
-------------------------+--------------------
Hi,
please extend wxPyton and Phonix to allow creating empty bitmaps via
`wx.Bitmap(x, y)` and `wx.Bitmap.Create(x, y)`like the wxWidgets manual
describes.
Both methods are not implemented in wxPython 3.0.2 currently:
{{{#!python
>>> wx.Bitmap().Create(1, 1)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_gdi.py", line
639, in __init__
_gdi_.Bitmap_swiginit(self,_gdi_.new_Bitmap(*args, **kwargs))
TypeError: Required argument 'name' (pos 1) not found
>>> wx.Bitmap(1, 1)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_gdi.py", line
639, in __init__
_gdi_.Bitmap_swiginit(self,_gdi_.new_Bitmap(*args, **kwargs))
TypeError: String or Unicode type required
}}}
Currently I use `wx.EmptyBitmap(x,y)` for Python, but is a wxPython-only
wrapper function. wxPerl and C++ are supporting creation of empty bitmaps
via `wx.Bitmap(x, y)` and `wx.Bitmap.Create(x, y)` like written in the
wxWidgets manual.
My general intention is to allow similar source code for different
languages. Thereby I kindly ask you to add support for `wx.Bitmap(x, y)`
and `wx.Bitmap.Create(x, y)` to the next wxPython and Phonix release.
Thank you,
Carsten
--
Ticket URL: <
http://trac.wxwidgets.org/ticket/17325>