X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74dc5eb60e80a9b2ceddd78cb577f42e48f5b3ba..2877659b059c5d20b07b585e26391dfd9ed780a2:/src/x11/pen.cpp diff --git a/src/x11/pen.cpp b/src/x11/pen.cpp index 339ef203f5..ecff52dd02 100644 --- a/src/x11/pen.cpp +++ b/src/x11/pen.cpp @@ -9,13 +9,15 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "pen.h" #endif #include "wx/setup.h" #include "wx/utils.h" #include "wx/pen.h" +#include "wx/colour.h" +#include "wx/bitmap.h" //----------------------------------------------------------------------------- // wxPen @@ -47,6 +49,7 @@ public: m_dash = new */ m_dash = data.m_dash; + m_stipple = data.m_stipple; } bool operator == (const wxPenRefData& data) const @@ -64,6 +67,7 @@ public: int m_capStyle; wxColour m_colour; int m_countDashes; + wxBitmap m_stipple; wxX11Dash *m_dash; }; @@ -141,6 +145,13 @@ void wxPen::SetJoin( int joinStyle ) M_PENDATA->m_joinStyle = joinStyle; } +void wxPen::SetStipple( wxBitmap *stipple ) +{ + AllocExclusive(); + + M_PENDATA->m_stipple = *stipple;; +} + void wxPen::SetStyle( int style ) { AllocExclusive(); @@ -205,3 +216,10 @@ wxColour &wxPen::GetColour() const return M_PENDATA->m_colour; } + +wxBitmap *wxPen::GetStipple() const +{ + wxCHECK_MSG( Ok(), &wxNullBitmap, wxT("invalid pen") ); + + return &M_PENDATA->m_stipple; +}