Project

General

Profile

Bug #8041

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

Added by Bruce Toll 6 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
Start date:
02/09/2021
Due date:
% Done:

0%

Estimated time:

Description

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.


Files

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

Updated by Korneel Dumon 5 months ago

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

Updated by Roel Standaert 5 months ago

  • Status changed from Implemented @Emweb to Resolved

Also available in: Atom PDF