Summary: | Transformed symbols sometimes disappear | ||
---|---|---|---|
Product: | [Unmaintained] ksvg | Reporter: | Jeff Smith <whydoubt> |
Component: | general | Assignee: | Nikolas Zimmermann <wildfox> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Testcase should show four circles
Patches bug in transforming symbols |
Description
Jeff Smith
2004-02-12 13:49:36 UTC
Created attachment 4651 [details]
Testcase should show four circles
Created attachment 4652 [details]
Patches bug in transforming symbols
On Thursday 12 February 2004 13:49, Jeff Smith wrote: > > Certain transformations in a 'use' cause the entire symbol not to be drawn. > For instance translate(-1,1) or translate(1,-1). > > After a lot of digging in code I found the cause: the clipping box is being > flipped by the transform. This causes everything *inside* the box to be > clipped when it should be clipping everything *outside* the box. > > I have a patch which fixes this by checking if the box is clockwise after > the affine transformation. If clockwise, flipping two of the vertices > corrects it. Oh my god :) Thank you very much! Already thought about active ksvg development? I'd appreciate it... Bye Bye Niko -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAK5rzs77DQgSFsQERAsKgAJ4oVsZ4HzcLgrKJQZ+SzwjQOXP0eACfdXRb zjPcYbuc9A2fNwBMo0g7e80= =cEI5 -----END PGP SIGNATURE----- I fixed this in kdegraphics/ksvg/plugin/backends/libart/LibartCanvas.cpp. I found that I could do this based on the sign of the determinant of the transformation matrix, rather than using trig on the vector product. |