wxCoord xoffset = 0, wxCoord yoffset = 0,
int fillStyle = wxODDEVEN_RULE);
- // TODO: Figure out what the start parameter means and devise a
- // good typemap for this
- //void DrawPolyPolygon(int n, int start[], wxPoint points[],
- // wxCoord xoffset = 0, wxCoord yoffset = 0,
- // int fillStyle = wxODDEVEN_RULE)
+ // TODO: Figure out a good typemap for this...
+ // Convert the first 3 args from a sequence of sequences?
+// void DrawPolyPolygon(int n, int count[], wxPoint points[],
+// wxCoord xoffset = 0, wxCoord yoffset = 0,
+// int fillStyle = wxODDEVEN_RULE);
+
// this version puts both optional bitmap and the text into the given
// rectangle and aligns is as specified by alignment parameter; it also
// will emphasize the character with the given index if it is != -1 and
%{
-//-=-=-=-=-=-=-=-=-=-=-
-#if 0
#include <wx/dcbuffer.h>
-#else
-
-
-// Temporarily put a set of classes here similar to the old buffered DC
-// classes until the real ones can be fixed to work "correctly" again.
-
-class wxBufferedDC : public wxMemoryDC
-{
-private:
- wxDC *m_dc;
- wxBitmap m_buffer;
-
-public:
-
- wxBufferedDC() : m_dc( 0 ) {}
-
- wxBufferedDC( wxDC *dc, const wxBitmap &buffer )
- : m_dc( dc ), m_buffer( buffer )
- {
- SelectObject( m_buffer );
- }
-
- wxBufferedDC( wxDC *dc, const wxSize &area )
- : m_dc( dc ), m_buffer( area.GetWidth(), area.GetHeight() )
- {
- SelectObject( m_buffer );
- }
-
- ~wxBufferedDC() {
- if( m_dc != 0 )
- UnMask();
- }
-
-
- void Init( wxDC *dc, const wxBitmap &buffer ) {
- wxASSERT_MSG( m_dc == 0 && m_buffer == wxNullBitmap,
- _T("wxBufferedDC already initialised") );
- m_dc = dc;
- m_buffer = buffer;
- SelectObject( m_buffer );
- }
-
- void Init( wxDC *dc, const wxSize &area ) {
- wxASSERT_MSG( m_dc == 0 && m_buffer == wxNullBitmap,
- _T("wxBufferedDC already initialised") );
- m_dc = dc;
- m_buffer = wxBitmap( area.GetWidth(), area.GetHeight() );
- SelectObject( m_buffer );
- }
-
- void UnMask() {
- wxASSERT_MSG( m_dc != 0, _T("No low level DC associated with buffer (anymore)") );
- m_dc->Blit( 0, 0, m_buffer.GetWidth(), m_buffer.GetHeight(), this, 0, 0 );
- m_dc = 0;
- }
-};
-
-
-class wxBufferedPaintDC : public wxBufferedDC
-{
-private:
- wxPaintDC m_paintdc;
-
-public:
- wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer = wxNullBitmap )
- : m_paintdc( window )
- {
- window->PrepareDC( m_paintdc );
-
- if( buffer != wxNullBitmap )
- Init( &m_paintdc, buffer );
- else
- Init( &m_paintdc, window->GetClientSize() );
- }
-
- ~wxBufferedPaintDC() {
- UnMask();
- }
-};
-
-#endif
-//-=-=-=-=-=-=-=-=-=-=-
%}
-
-
class wxBufferedDC : public wxMemoryDC
{
public:
%newgroup
-#ifdef __WXMSW__
+#if defined(__WXMSW__) || defined(__WXMAC__)
%{
#include <wx/metafile.h>
int GetWidth();
int GetHeight();
+#ifdef __WXMSW__
const wxString& GetFileName() const;
-
+#endif
+
%pythoncode { def __nonzero__(self): return self.Ok() }
};