Bug #8041

WCanvasPaintDevice::drawArc() with wide WPen renders differently than other painters

Added by Bruce Toll about 2 years ago. Updated over 1 year ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


It looks like there may be an issue with WCanvasPaintDevice::drawArc() when stroked with a wide WPen

This is probably the same issue reported in Ellipses are not drawn correctly WPainter.drawEllipse. I have an application that generates a PDF with lots of drawArc() calls with a WPen so I wrote a small test program to verify that it was working as expected. The test program is attached. It renders three ellipses with different pen widths on canvas, png, and svg. There's a button to generate an analogous PDF. The canvas with a wide pen seems to be an outlier.

Testing was done on Linux with github master at 4.5.0-rc1-37-g73fa1010.

A quick attempt to address the issue was to comment out line 287 in WCanvasPaintDevice.C. That seems to help with the example program, but I'm not sure that it is the correct solution. It's also possible that a change would adversely affect existing users of the library.


test_ellipse_size_20210208a.C (3 KB) test_ellipse_size_20210208a.C Bruce Toll, 02/09/2021 02:07 PM

Updated by Korneel Dumon about 2 years ago

  • Status changed from New to Implemented @Emweb
  • Target version set to 4.5.1

Updated by Roel Standaert about 2 years ago

  • Status changed from Implemented @Emweb to Resolved

Updated by Roel Standaert over 1 year ago

  • % Done changed from 0 to 100

Updated by Roel Standaert over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF