/////////////////////////////////////////////////////////////////////////////
-// Name: bitmap.cpp
+// Name: src/gtk/bitmap.cpp
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
Create( bitmap, colour );
}
+#if wxUSE_PALETTE
wxMask::wxMask( const wxBitmap& bitmap, int paletteIndex )
{
m_bitmap = (GdkBitmap *) NULL;
Create( bitmap, paletteIndex );
}
+#endif // wxUSE_PALETTE
wxMask::wxMask( const wxBitmap& bitmap )
{
return true;
}
+#if wxUSE_PALETTE
bool wxMask::Create( const wxBitmap& bitmap, int paletteIndex )
{
unsigned char r,g,b;
return Create(bitmap, wxColour(r, g, b));
}
+#endif // wxUSE_PALETTE
bool wxMask::Create( const wxBitmap& bitmap )
{
gdk_pixbuf_unref( m_pixbuf );
#endif
delete m_mask;
+#if wxUSE_PALETTE
delete m_palette;
+#endif // wxUSE_PALETTE
}
//-----------------------------------------------------------------------------
{
GdkPixbuf *pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
gdk_pixbuf_get_has_alpha(GetPixbuf()),
- 8, GetWidth(), GetHeight());
+ 8, rect.width, rect.height);
ret.SetPixbuf(pixbuf);
gdk_pixbuf_copy_area(GetPixbuf(),
rect.x, rect.y, rect.width, rect.height,
return true;
}
+#if wxUSE_PALETTE
wxPalette *wxBitmap::GetPalette() const
{
if (!Ok())
{
// TODO
}
+#endif // wxUSE_PALETTE
void wxBitmap::SetHeight( int height )
{
#endif
}
-void wxBitmap::UngetRawData(wxPixelDataBase& data)
+void wxBitmap::UngetRawData(wxPixelDataBase& WXUNUSED(data))
{
}
{
}
-bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth)
+bool wxBitmapHandler::Create(wxBitmap * WXUNUSED(bitmap),
+ void * WXUNUSED(data),
+ long WXUNUSED(type),
+ int WXUNUSED(width),
+ int WXUNUSED(height),
+ int WXUNUSED(depth))
{
+ wxFAIL_MSG( _T("not implemented") );
+
return false;
}
-bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
- int desiredWidth, int desiredHeight)
+bool wxBitmapHandler::LoadFile(wxBitmap * WXUNUSED(bitmap),
+ const wxString& WXUNUSED(name),
+ long WXUNUSED(flags),
+ int WXUNUSED(desiredWidth),
+ int WXUNUSED(desiredHeight))
{
+ wxFAIL_MSG( _T("not implemented") );
+
return false;
}
-bool wxBitmapHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette)
+bool wxBitmapHandler::SaveFile(const wxBitmap * WXUNUSED(bitmap),
+ const wxString& WXUNUSED(name),
+ int WXUNUSED(type),
+ const wxPalette * WXUNUSED(palette))
{
+ wxFAIL_MSG( _T("not implemented") );
+
return false;
}
{
// TODO: Insert handler based on GdkPixbufs handler later
}
-
-