]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/pen.cpp
since drawtext does not have to take linefeeds into account, they're #if 0'ed now...
[wxWidgets.git] / src / x11 / pen.cpp
index 339ef203f524fdcd84a3bf0ba517e18f41c88a51..ecff52dd0289a7831675edbf65356dcdb04b692b 100644 (file)
@@ -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;
+}