X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74dc5eb60e80a9b2ceddd78cb577f42e48f5b3ba..7b25d8e7bd0eca9f0f6efe62b3721d14c394dac9:/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; +}