|
From: Ethan A M. <merritt@u.washington.edu> - 2006-02-02 04:59:24
|
On Wednesday 01 February 2006 06:22 pm, Mojca Miklavec wrote: > > I experienced some problems with MetaPost driver recently when drawing > a function similar to sin(1000*x), ie. with sharp turns up and down. > MetaPost draws a continuous line instead of isolated line segments, > which is OK and even much better in most cases. But it uses "sharp" > corners (instead of the rounded ones) which then stick out way above > and below the line where the function passes through. (I have to check > how this is solved in PostScript.) Postscript has a command "setlinejoin" which selects either mitred, rounded, or beveled corners. http://www.capcode.de/help/setlinejoin Gnuplot's postscript driver allows you to select either "rounded" or "butt" (really mitred) in the "set term" command. Mike Sutton recently contributed an equivalent for the png/gif/jpeg driver. The plan is to add the same option to additional terminal types if they can support it. > One thing can be (has to be) fixed in the terminal itself however: > when MetaPost draws a rectangular frame, it uses continuous line from > 4 line segments, but the beginning of the first line and the end of > the last line are "not properly connected" (the curve is not closed). You are more than welcome to contribute a patch to fix this. The metapost driver does not seem to have an active champion right now, so it is only sporadically updated. But it's not obvious to me why the line would not be closed. The code appears to claim 2400 dpi resolution, which I should think is sufficient to give accurate line joins. But maybe the resolution is not truly as high as it claims. Or are you saying that it meets up properly, but the line-join at that corner is not consisent with the other line-joins? -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |