class wxBitmap : public wxGDIObject
{
public:
- wxBitmap(const wxString& name, wxBitmapType type=wxBITMAP_TYPE_BMP);
+ wxBitmap(const wxString& name, wxBitmapType type=wxBITMAP_TYPE_ANY);
~wxBitmap();
wxPalette* GetPalette();
wxMask* GetMask();
- bool LoadFile(const wxString& name, wxBitmapType type=wxBITMAP_TYPE_BMP);
+ bool LoadFile(const wxString& name, wxBitmapType type=wxBITMAP_TYPE_ANY);
bool SaveFile(const wxString& name, wxBitmapType type, wxPalette* palette = NULL);
void SetMask(wxMask* mask);
#ifdef __WXMSW__
%addmethods {
void Append(const wxString& name, int red, int green, int blue) {
+ // first see if the name is already there
+ wxString cName = name;
+ cName.MakeUpper();
+ wxString cName2 = cName;
+ if ( !cName2.Replace("GRAY", "GREY") )
+ cName2.clear();
+
+ wxNode *node = self->First();
+ while ( node ) {
+ const wxChar *key = node->GetKeyString();
+ if ( cName == key || cName2 == key ) {
+ wxColour* c = (wxColour *)node->Data();
+ c->Set(red, green, blue);
+ return;
+ }
+ node = node->Next();
+ }
+
+ // otherwise append the new colour
self->Append(name.c_str(), new wxColour(red, green, blue));
}
}
~wxRegion();
void Clear();
+#ifndef __WXMAC__
bool Offset(wxCoord x, wxCoord y);
+#endif
wxRegionContain Contains(long x, long y);
%name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt);