Re: [OpenJDK 2D-Dev] Fix for uniformly scaled dashed lines.

2010-07-07 Thread Jim Graham
This looks good, but don't assert that the transform is non-singular. Transforms can frequently be singular and that isn't an exception. Actually, a singular transform simply means that the entire coordinate space has collapsed to a line or a point and so nothing need be rendered. If there is

Re: [OpenJDK 2D-Dev] Fix for uniformly scaled dashed lines.

2010-07-07 Thread Jim Graham
Hi Denis, Saving the arrays depends on both the original value of the array and also the transform being used. Can a given Dasher be used by more than one rendering thread at a time? (I forget if this is possible.) Even if we currently cannot use them from more than one thread, I prefer re

Re: [OpenJDK 2D-Dev] Fix for uniformly scaled dashed lines.

2010-07-02 Thread Denis Lila
Hello Jim. Here is a webrev for the patch: http://icedtea.classpath.org/~dlila/webrevs/dasherFix/webrev/ I have eliminated most of the setup code, like you suggested. This is both more efficient, and far clearer than the original code (and especially my version of the patch. It is also correct i

Re: [OpenJDK 2D-Dev] Fix for uniformly scaled dashed lines.

2010-06-22 Thread Denis Lila
Hello Jim. Sorry about the l. It was already there, and I wanted to change as little as possible. As for whether to compute the transformed dashes inside the while(true) or not... the main point of this patch was to fix a bug where zooming transforms weren't handled properly. The efficiency impr

Re: [OpenJDK 2D-Dev] Fix for uniformly scaled dashed lines.

2010-06-21 Thread Jim Graham
Hi Denis, One request on your code - please don't use the variable "lowercase L". On my screen with Courier font I cannot distinguish between the number 1 and the lowercase L character and so I cannot verify if your code is correct. Also, by "inner loop" I meant the single loop. I use the

Re: [OpenJDK 2D-Dev] Fix for uniformly scaled dashed lines.

2010-06-21 Thread Denis Lila
Oops, I forgot the attachment. I'm sorry. - "Denis Lila" wrote: > Hello Jim. > > Thank you for your reply. It seems my code did not fully take into > account your second point after all. > The dx's of the transformed dashes are di*newx/ (where > di is the untransformed dash length, newx is

Re: [OpenJDK 2D-Dev] Fix for uniformly scaled dashed lines.

2010-06-21 Thread Denis Lila
Hello Jim. Thank you for your reply. It seems my code did not fully take into account your second point after all. The dx's of the transformed dashes are di*newx/ (where di is the untransformed dash length, newx is the transformed x coordinate, and is the untransformed line length). Obviously, n

Re: [OpenJDK 2D-Dev] Fix for uniformly scaled dashed lines.

2010-06-18 Thread Jim Graham
Hi Denis, Here are my thoughts on it: - Lines are affinely transformed into lines. The slope may be different before and after the transform, but both have a single slope. - The ratio of a line length to its transformed line length is a scale factor that depends solely on the angle of the l

[OpenJDK 2D-Dev] Fix for uniformly scaled dashed lines.

2010-06-15 Thread Denis Lila
Hello. I think I have a fix for this bug: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=504 The problem is caused by the "symmetric" variable in pisces/Dasher.java. symmetric is set to (m00 == m11 && m10 == -m01), and never changed. It is only used in one place (in lineTo) to simplify t