Get rid of wxGTKDash, it's the same as wxDash
This commit is contained in:
parent
41311298eb
commit
5b679bfbec
@ -9,8 +9,6 @@
|
||||
#ifndef _WX_GTK_PEN_H_
|
||||
#define _WX_GTK_PEN_H_
|
||||
|
||||
typedef signed char wxGTKDash;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPen
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -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<wxDash*>(req_dash), req_nb_dash);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user