Closed ajyoon closed 2 years ago
@Xavman42 github won't let me assign a review to you, but if you'd like to take a look over this before I merge I'd appreciate a sanity check!
A very thick straight line:
Your example:
This looks like a big improvement to me! I wonder if this is related to the flowable clipping issues in #21. Consider this approved!
Those problems are definitely related, but I don't expect this to fix them. thanks!
The key problem was that the QClippingPath's padding was set from the pen value before the pen was set, so it was always using the default pen width even when the drawn path had a different pen. The solution was to simply defer the padding calculation to occur within
update_geometry()
.This change also fixes a few other related issues:
width / 2
, not just the width, since Qt divides the pen stroke width evenly across the ideal path line.update_geometry
twice for every render. This change adds a QClippingPath init parameterdefer_geometry_calculation
which allows us to improve performance by avoiding this.Fixes #14 thanks to help from @Xavman42