Summary: | Artefacts while rotating thick lines | ||
---|---|---|---|
Product: | [Applications] calligracommon | Reporter: | BKrev <krevert> |
Component: | general | Assignee: | Calligra Bugs <calligra-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cbo, t.zachmann |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/calligra/3ae76a85250832092c5fc3510ec4b556cddb6467 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Screenshot |
Description
David Faure
2010-12-17 19:41:15 UTC
So much confusion in the comments. Boundingbox is in document coordinates and view aligned and should only be used for finding parts of the screen that needs updating. Outline is what the shape manipulation tool draws around the shape when rotating. The outline is specified in shape coordinates. The poster is correct in modifying the bounding box, though it should be done a bit earlier in the code i feel. so scaling etc would also happen to the width. Bounding box should _never_ be used for calculating (eg aligning shapes). If that is still done it should be fixed. If someone is not convinced: bounding box even includes shadow and filter effect Looking at the code it seems a similar but more advanced fix has been added. I can still get artifacts though ah bah that code is only entered when there is markers, will rearrange the code and then it should be fixed ok it worked but here is something to consider: In pathshape we stroke the path to create an outline when there are markers. It seems overkill to me. All we need is a bounding box. If there is an easy way to find the length and width of the markers it can be done considerably easier: 1) take the boundingbox of the outline() 2) make a square rect that has side equal to 2*max(length,width) of the start marker 3) same for end marker 4) create a union rect of 1 and 2 (centered on start of path) and 3 (centered on end of path) Git commit 3ae76a85250832092c5fc3510ec4b556cddb6467 by C. Boemann. Committed on 01/05/2012 at 20:10. Pushed by boemann into branch 'master'. Fix artifacts due to linewidth We just use the method already used for lines with markers. It's similar idea to what the bug owner posted, just more advanced M +6 -10 libs/flake/KoPathShape.cpp http://commits.kde.org/calligra/3ae76a85250832092c5fc3510ec4b556cddb6467 |