diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h index 40f809b5ef..c6bfbe3b0b 100644 --- a/include/wx/gtk/pen.h +++ b/include/wx/gtk/pen.h @@ -9,8 +9,6 @@ #ifndef _WX_GTK_PEN_H_ #define _WX_GTK_PEN_H_ -typedef signed char wxGTKDash; - //----------------------------------------------------------------------------- // wxPen //----------------------------------------------------------------------------- diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 53968f6631..0fd550d7ac 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1582,22 +1582,22 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) } } - static const wxGTKDash dotted[] = {1, 1}; - static const wxGTKDash short_dashed[] = {2, 2}; - static const wxGTKDash wxCoord_dashed[] = {2, 4}; - static const wxGTKDash dotted_dashed[] = {3, 3, 1, 3}; + static const wxDash dotted[] = {1, 1}; + static const wxDash short_dashed[] = {2, 2}; + static const wxDash wxCoord_dashed[] = {2, 4}; + static const wxDash dotted_dashed[] = {3, 3, 1, 3}; // We express dash pattern in pen width unit, so we are // independent of zoom factor and so on... int req_nb_dash; - const wxGTKDash *req_dash; + const wxDash* req_dash; GdkLineStyle lineStyle = GDK_LINE_ON_OFF_DASH; switch (m_pen.GetStyle()) { case wxPENSTYLE_USER_DASH: req_nb_dash = m_pen.GetDashCount(); - req_dash = (wxGTKDash*)m_pen.GetDash(); + req_dash = m_pen.GetDash(); break; case wxPENSTYLE_DOT: req_nb_dash = 2; @@ -1629,7 +1629,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) if (req_dash && req_nb_dash) { - wxGTKDash *real_req_dash = new wxGTKDash[req_nb_dash]; + wxDash* real_req_dash = new wxDash[req_nb_dash]; if (real_req_dash) { for (int i = 0; i < req_nb_dash; i++) @@ -1640,7 +1640,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) else { // No Memory. We use non-scaled dash pattern... - gdk_gc_set_dashes( m_penGC, 0, (wxGTKDash*)req_dash, req_nb_dash ); + gdk_gc_set_dashes(m_penGC, 0, const_cast(req_dash), req_nb_dash); } } diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp index c23c144c6b..d6d4da8427 100644 --- a/src/gtk/pen.cpp +++ b/src/gtk/pen.cpp @@ -54,7 +54,7 @@ public: if ( m_dash ) { if ( !data.m_dash || - memcmp(m_dash, data.m_dash, m_countDashes*sizeof(wxGTKDash)) ) + memcmp(m_dash, data.m_dash, m_countDashes*sizeof(wxDash)) ) { return false; } @@ -78,7 +78,7 @@ public: wxPenCap m_capStyle; wxColour m_colour; int m_countDashes; - wxGTKDash *m_dash; + const wxDash* m_dash; }; //----------------------------------------------------------------------------- @@ -139,7 +139,7 @@ void wxPen::SetDashes( int number_of_dashes, const wxDash *dash ) AllocExclusive(); M_PENDATA->m_countDashes = number_of_dashes; - M_PENDATA->m_dash = (wxGTKDash *)dash; + M_PENDATA->m_dash = dash; } void wxPen::SetColour( unsigned char red, unsigned char green, unsigned char blue )