if (!pen.IsOk()) return;
int oldStyle = m_pen.IsOk() ? m_pen.GetStyle() : wxPENSTYLE_INVALID;
+ wxPenCap oldCap = m_pen.IsOk() ? m_pen.GetCap() : wxCAP_INVALID;
+ wxPenJoin oldJoin = m_pen.IsOk() ? m_pen.GetJoin() : wxJOIN_INVALID;
m_pen = pen;
+ wxPenCap cap = m_pen.IsOk() ? m_pen.GetCap() : wxCAP_INVALID;
+ wxPenJoin join = m_pen.IsOk() ? m_pen.GetJoin() : wxJOIN_INVALID;
double width;
PsPrint( " setdash\n" );
}
+ if ( cap != wxCAP_INVALID && cap != oldCap )
+ {
+ switch ( cap )
+ {
+ case wxCAP_ROUND: buffer = "1"; break;
+ case wxCAP_PROJECTING: buffer = "2"; break;
+ case wxCAP_BUTT: buffer = "0"; break;
+
+ // This case is just to fix compiler warning, this is impossible
+ // due to the test above.
+ case wxCAP_INVALID: break;
+ }
+ buffer << " setlinecap\n";
+ PsPrint( buffer );
+ }
+
+ if ( join != wxJOIN_INVALID && join != oldJoin )
+ {
+ switch ( join )
+ {
+ case wxJOIN_BEVEL: buffer = "2"; break;
+ case wxJOIN_ROUND: buffer = "1"; break;
+ case wxJOIN_MITER: buffer = "0"; break;
+ case wxJOIN_INVALID: break;
+ }
+ buffer << " setlinejoin\n";
+ PsPrint( buffer );
+ }
+
// Line colour
unsigned char red = m_pen.GetColour().Red();
unsigned char blue = m_pen.GetColour().Blue();