Added handling of dashes (patch #1438894).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis 2006-02-26 16:53:11 +00:00
parent 4d496ecbc4
commit 9e87870780
2 changed files with 13 additions and 23 deletions

View File

@ -33,6 +33,8 @@ protected:
int m_nJoin;
int m_nCap;
wxBitmap m_vStipple;
int m_nbDash;
wxDash * m_dash;
wxColour m_vColour;
WXHPEN m_hPen;// in OS/2 GPI this will be the PS the pen is associated with
};
@ -83,10 +85,13 @@ public:
inline int GetJoin(void) const { return (M_PENDATA ? M_PENDATA->m_nJoin : 0); };
inline int GetCap(void) const { return (M_PENDATA ? M_PENDATA->m_nCap : 0); };
inline int GetPS(void) const { return (M_PENDATA ? M_PENDATA->m_hPen : 0); };
int GetDashes(wxDash **ptr) const;
int GetDashCount() const;
wxDash* GetDash() const;
inline int GetDashes(wxDash **ptr) const
{
*ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
}
inline wxDash* GetDash() const { return (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*)NULL); };
inline int GetDashCount() const { return (M_PENDATA ? M_PENDATA->m_nbDash : 0); };
inline wxBitmap* GetStipple(void) const { return (M_PENDATA ? (& M_PENDATA->m_vStipple) : (wxBitmap*) NULL); };

View File

@ -32,6 +32,8 @@ wxPenRefData::wxPenRefData()
m_nWidth = 1;
m_nJoin = wxJOIN_ROUND ;
m_nCap = wxCAP_ROUND ;
m_nbDash = 0 ;
m_dash = (wxDash*)NULL;
m_hPen = 0L;
} // end of wxPenRefData::wxPenRefData
@ -43,6 +45,8 @@ wxPenRefData::wxPenRefData(
m_nWidth = rData.m_nWidth;
m_nJoin = rData.m_nJoin;
m_nCap = rData.m_nCap;
m_nbDash = rData.m_nbDash;
m_dash = rData.m_dash;
m_vColour = rData.m_vColour;
m_hPen = 0L;
} // end of wxPenRefData::wxPenRefData
@ -404,25 +408,6 @@ void wxPen::SetDashes( int WXUNUSED(nNbDashes),
//
} // end of wxPen::SetDashes
int wxPen::GetDashes( wxDash **ptr ) const
{
// TODO
*ptr = (wxDash*) NULL;
return 0;
}
int wxPen::GetDashCount() const
{
// TODO
return 0;
}
wxDash* wxPen::GetDash() const
{
// TODO
return NULL;
}
void wxPen::SetJoin(
int nJoin
)