M_PENDATA->m_join = wxJOIN_ROUND ;
M_PENDATA->m_cap = wxCAP_ROUND ;
M_PENDATA->m_nbDash = 0 ;
M_PENDATA->m_join = wxJOIN_ROUND ;
M_PENDATA->m_cap = wxCAP_ROUND ;
M_PENDATA->m_nbDash = 0 ;
M_PENDATA->m_join = wxJOIN_ROUND ;
M_PENDATA->m_cap = wxCAP_ROUND ;
M_PENDATA->m_nbDash = 0 ;
M_PENDATA->m_join = wxJOIN_ROUND ;
M_PENDATA->m_cap = wxCAP_ROUND ;
M_PENDATA->m_nbDash = 0 ;
// Join style, Cap style, Pen Stippling only on Win32.
// Currently no time to find equivalent on Win3.1, sorry
// [if such equiv exist!!]
// Join style, Cap style, Pen Stippling only on Win32.
// Currently no time to find equivalent on Win3.1, sorry
// [if such equiv exist!!]
if (M_PENDATA->m_join==wxJOIN_ROUND &&
M_PENDATA->m_cap==wxCAP_ROUND &&
M_PENDATA->m_style!=wxUSER_DASH &&
M_PENDATA->m_style!=wxSTIPPLE &&
if (M_PENDATA->m_join==wxJOIN_ROUND &&
M_PENDATA->m_cap==wxCAP_ROUND &&
M_PENDATA->m_style!=wxUSER_DASH &&
M_PENDATA->m_style!=wxSTIPPLE &&
{
case wxJOIN_BEVEL: ms_style |= PS_JOIN_BEVEL; break;
case wxJOIN_MITER: ms_style |= PS_JOIN_MITER; break;
{
case wxJOIN_BEVEL: ms_style |= PS_JOIN_BEVEL; break;
case wxJOIN_MITER: ms_style |= PS_JOIN_MITER; break;
- logb.lbStyle = BS_HATCHED;
- logb.lbHatch = HS_BDIAGONAL;
- break;
- case wxCROSSDIAG_HATCH:
- logb.lbStyle = BS_HATCHED;
- logb.lbHatch = HS_DIAGCROSS;
- break;
- case wxFDIAGONAL_HATCH:
- logb.lbStyle = BS_HATCHED;
- logb.lbHatch = HS_FDIAGONAL;
- break;
- case wxCROSS_HATCH:
- logb.lbStyle = BS_HATCHED;
- logb.lbHatch = HS_CROSS;
- break;
- case wxHORIZONTAL_HATCH:
- logb.lbStyle = BS_HATCHED;
- logb.lbHatch = HS_HORIZONTAL;
- break;
- case wxVERTICAL_HATCH:
- logb.lbStyle = BS_HATCHED;
- logb.lbHatch = HS_VERTICAL;
- break;
- default:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_BDIAGONAL;
+ break;
+ case wxCROSSDIAG_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_DIAGCROSS;
+ break;
+ case wxFDIAGONAL_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_FDIAGONAL;
+ break;
+ case wxCROSS_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_CROSS;
+ break;
+ case wxHORIZONTAL_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_HORIZONTAL;
+ break;
+ case wxVERTICAL_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_VERTICAL;
+ break;
+ default:
- {
- real_dash = new wxDash[M_PENDATA->m_nbDash];
- int i;
- for (i=0; i<M_PENDATA->m_nbDash; i++)
- real_dash[i] = M_PENDATA->m_dash[i] * M_PENDATA->m_width;
+ {
+ real_dash = new wxMSWDash[M_PENDATA->m_nbDash];
+ int rw = M_PENDATA->m_width > 1 ? M_PENDATA->m_width : 1;
+ for ( int i = 0; i < M_PENDATA->m_nbDash; i++ )
+ real_dash[i] = M_PENDATA->m_dash[i] * rw;
- if (wxGetOsVersion()==wxWINDOWS_NT || wxGetOsVersion()==wxWIN95)
- {
- M_PENDATA->m_hPen =
- (WXHPEN) ExtCreatePen( ms_style,
- M_PENDATA->m_width,
- &logb,
- M_PENDATA->m_style==wxUSER_DASH
- ? M_PENDATA->m_nbDash
- : 0,
- (const DWORD*)real_dash );
- }
- else
+ if (wxGetOsVersion()==wxWINDOWS_NT || wxGetOsVersion()==wxWIN95)
- M_PENDATA->m_hPen =
- (WXHPEN) CreatePen( wx2msPenStyle(M_PENDATA->m_style),
- M_PENDATA->m_width,
- ms_colour );
+ M_PENDATA->m_hPen =
+ (WXHPEN) ExtCreatePen( ms_style,
+ M_PENDATA->m_width,
+ &logb,
+ M_PENDATA->m_style == wxUSER_DASH
+ ? M_PENDATA->m_nbDash
+ : 0,
+ (LPDWORD)real_dash );
+ }
+ else
+ {
+ M_PENDATA->m_hPen =
+ (WXHPEN) CreatePen( wx2msPenStyle(M_PENDATA->m_style),
+ M_PENDATA->m_width,
+ ms_colour );