wxPen pen cap style and pen join style are not respected when using wxPdfDC
Fix below as a unified diff:
Index: pdfdc29.inc =================================================================== --- pdfdc29.inc (revision 3182) +++ pdfdc29.inc (working copy) @@ -1326,6 +1326,36 @@ style.SetDash(dash); break; } + switch (curPen.GetCap()) + { + case wxCAP_BUTT: + style.SetLineCap(wxPDF_LINECAP_BUTT); + break; + case wxCAP_ROUND: + style.SetLineCap(wxPDF_LINECAP_ROUND); + break; + case wxCAP_PROJECTING: + style.SetLineCap(wxPDF_LINECAP_SQUARE); + break; + default: + style.SetLineCap(wxPDF_LINECAP_ROUND); + break; + } + switch (curPen.GetJoin()) + { + case wxJOIN_MITER: + style.SetLineJoin(wxPDF_LINEJOIN_MITER); + break; + case wxJOIN_ROUND: + style.SetLineJoin(wxPDF_LINEJOIN_ROUND); + break; + case wxJOIN_BEVEL: + style.SetLineJoin(wxPDF_LINEJOIN_BEVEL); + break; + default: + style.SetLineJoin(wxPDF_LINEJOIN_MITER); + break; + } m_pdfDocument->SetLineStyle(style); } else
Fixed in wxCode SVN.