[Development] Issues with QPainter::drawPolygon (off by one error?)

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Sun Apr 28 13:59:03 CEST 2024


Am 28.04.2024 um 13:50 schrieb Allan Sandfeld Jensen:
> I think the problem with the cosmetic pen is partly the need to be symmetric.
> Years ago I tried cleaning up the cosmetic pen, but had to revert it because
> it violated rules about symmetry.
>
> https://codereview.qt-project.org/c/qt/qtbase/+/200383
>
> Though perhaps the non-cosmetic painting could have the rounding adjusted so
> it would look better for your example. Otherwise try offsetting the triangle
> by 0.5

I think I found a valid solution now:
https://codereview.qt-project.org/c/qt/qtbase/+/557989
The call to QPainter::drawPoints() is really strange - it is only needed
for the lower left edge when drawing PE_IndicatorArrowLeft on my system
here but I can't tell if it's diffferent for other sizes or systems... :(

Thx,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20240428/219131a5/attachment.htm>


More information about the Development mailing list