Issue:Line styles look different in png and svg

From FollowTheScore
Jump to: navigation, search
Description: spacing of dots differs, dashed lines look slightly fragmented in png, triple doesn´t work
Extension / Version: aiSee   /   2.2
Type / Status: Bug   /   open

Problem

Certainly these are minor issues. Still it is astonishing why algorithms should be different depending on the output driver ...

  • spacing of dashes is uneven
  • spacing of dashes differs between svg and png
  • dashed line gets fragmented in png
  • thick dotted lines glue together in png
  • triple does not work
  • double and triple produced lines which are thinner than 'normal'
  • this looks especially strange in combination with manhattan edges Wgraph:Demo manhattan_edges

See Wgraph:Demo line_style

Reply

When exporting a graph to SVG, line styles are directly translated from GDL into corresponding SVG attributes. (Line styles of splines are currently not being exported correctly, but that's a separate issue.) While line drawing is ultimately handled by the end user's SVG viewer and the results may differ, in general we have very strong control over things like line thickness, dash spacing, spline bending factors and such.

As opposed to that, when drawing a graph in the GUI or exporting it to a bitmap format, the drawing of dotted/dashed/double/triple lines is handled by the operating system's internal libraries over which we have no control at all. That's quite a can of worms, actually. The results may differ greatly between different operating systems and even between different machines. On some machines, some line styles may not be available at all. Under Windows, double/triple line styles tend to change their appearance at different zoom levels. We also greatly miss antialiasing. And so on.

That mess will be fixed once we switch to QT, which will provide consistent results across Windows and Linux.

--Schwallex 15:42, 14 November 2007 (CET)