Version: (using KDE KDE 3.2.0) Installed from: Compiled From Sources Compiler: gcc 3.2 OS: Linux 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.
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.