]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/pen.cpp
bug fix for MacTel builds, using the same code on PPC as well (wxMask)
[wxWidgets.git] / src / mac / carbon / pen.cpp
index 3c3d9f033b40341f57fe56c31dc5c9764a1d42b0..2fb238858ad1a9e74d835a2640dbc2c24b9ecb86 100644 (file)
@@ -1,25 +1,20 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        pen.cpp
+// Name:        src/mac/carbon/pen.cpp
 // Purpose:     wxPen
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     1998-01-01
 // RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "pen.h"
-#endif
+#include "wx/wxprec.h"
 
-#include "wx/setup.h"
 #include "wx/utils.h"
 #include "wx/pen.h"
 
-#if !USE_SHARED_LIBRARIES
 IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
-#endif
 
 wxPenRefData::wxPenRefData()
 {
@@ -32,7 +27,7 @@ wxPenRefData::wxPenRefData()
 }
 
 wxPenRefData::wxPenRefData(const wxPenRefData& data)
-    : wxGDIRefData()
+: wxGDIRefData()
 {
     m_style = data.m_style;
     m_width = data.m_width;
@@ -90,17 +85,17 @@ wxPen::wxPen(const wxBitmap& stipple, int Width)
 
 void wxPen::Unshare()
 {
-       // Don't change shared data
-       if (!m_refData)
+    // Don't change shared data
+    if (!m_refData)
     {
-               m_refData = new wxPenRefData();
-       }
+        m_refData = new wxPenRefData();
+    }
     else
     {
-               wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData);
-               UnRef();
-               m_refData = ref;
-       }
+        wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData);
+        UnRef();
+        m_refData = ref;
+    }
 }
 
 void wxPen::SetColour(const wxColour& col)
@@ -108,7 +103,7 @@ void wxPen::SetColour(const wxColour& col)
     Unshare();
 
     M_PENDATA->m_colour = col;
-  
+
     RealizeResource();
 }
 
@@ -117,7 +112,7 @@ void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
     Unshare();
 
     M_PENDATA->m_colour.Set(r, g, b);
-  
+
     RealizeResource();
 }
 
@@ -145,7 +140,7 @@ void wxPen::SetStipple(const wxBitmap& Stipple)
 
     M_PENDATA->m_stipple = Stipple;
     M_PENDATA->m_style = wxSTIPPLE;
-  
+
     RealizeResource();
 }
 
@@ -155,7 +150,7 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *Dash)
 
     M_PENDATA->m_nbDash = nb_dashes;
     M_PENDATA->m_dash = (wxDash *)Dash;
-  
+
     RealizeResource();
 }
 
@@ -179,8 +174,6 @@ void wxPen::SetCap(int Cap)
 
 bool wxPen::RealizeResource()
 {
-       // nothing to do here for mac
-    return TRUE;
+    // nothing to do here for mac
+    return true;
 }
-
-