Stefan Schimanski wrote:
Hi!

Here is the correct patch now. The dots appear as before.

This patch is good Stephan, thanks for the refinement. Could someone please commit this patch?

By the way Stephan, could you please send an email to the list stating that you agree to license all your LyX patches to GPL version 2 or later? Thanks in advance.

If you wonder why the dots are looking strange: that's because integers are passed to the Painter class as coordinates. And there is a problem with rounding: decorations are defined in a 1.0x1.0 coordinate system and scaled to the right pixel size on the screen later. All coordinates (e.g. start and end-points of lines) are rounded to integers before rendering. The result can be that equally long (or equally distributed) points or lines look oddly distributed on screen. In the first screenshot the width/height of a line is rounded independently from the position (hence the dimension of the points is equally big). In the second the end position is rounded (hence the width can vary depending on the position; this is the way it is in subversion currently), either case is not perfect. Antialiasing cannot help as long as integers are used in rendering. With floats as coordinates antialiasing could solve this (could be activated for short lines, for long it's more important to be sharp).

We'll gladly accept a second patch after this one ;-)

Abdel.

Reply via email to