From: Dave D. <dde...@es...> - 2004-08-12 13:54:23
|
Daniel J Sebald <dan...@ie...> writes: > Dave Denholm wrote: > >>Ethan Merritt <merritt@u.washington.edu> writes: >> >> >>>On Monday 09 August 2004 11:04 pm, mi...@ph... wrote: >>> >>>>Bug: >>>>On x11 (well, I haven't look to other terminals), points in the points and >>>>linepoints styles are "handicapped" -- look by a screen magnificator (xmag, >>>>kmag) to points obtained by: >>>> >>>>set size ratio 1 >>>>plot sin(x)/x w point pt 2 >>>> >>>That is one strange bug you have found. The odd thing is that it seems >>>to be a bug in the X server. I can run the same gnuplot_x11 executable >>>on two different machines and get two different results. My best guess >>>at the moment is that the key difference is which version of X11 is >>>running, although it is also possible that it is a difference in the video >>>driver rather than the version. The issue is whether the rendering >>>engine does, or does not, draw the final pixel in a line segment that is >>>at 45 degrees. Changing the drawing style from CapButt to CapRound >>>while drawing points fixes this, at least on the machines I have tested. >>>I can't think of any bad effects from this so I will make the change. >>>I'm sure someone will speak up if it uncovers some complementary >>>bug on other X11 display setups. >>> >>> >> >> >>Does gnuplot use zero-width lines for these ? I have a vague >>recollection that if linewidth is set to 0, the X server can use a >>device-specific algorithm for drawing the pixels. A linewidth of 1 >>specifies the exact semantics which must be followed. >> >> >>Yeah - looks like : >> >> else if (*buffer == 'P') { >> /* linux sscanf does not like %1d%4d%4d" with Oxxxxyyyy */ >> /* sscanf(buffer, "P%1d%4d%4d", &point, &x, &y); */ >> point = buffer[1] - '0'; >> sscanf(buffer + 2, "%4d%4d", &x, &y); >> if (point == 7) { >> /* set point size */ >> px = (int) (x * xscale * pointsize); >> py = (int) (y * yscale * pointsize); >> } else { >> if (type != LineSolid || width != 0) { /* select solid line */ >> XSetLineAttributes(dpy, gc, 0, LineSolid, CapButt, JoinBevel); >> } >> >> >>- try setting the linewidth param to 1 in the XSetLineAttributes call. >> > > I printed out the numbers and verified that > > plot->lwidth > > is 1. I've concluded, like Ethan, that the behavior of this routine > doesn't match what the documentation says. (It's as though there is > some confusion between CapButt and CapNotLast.) Also, I think > CapRound, i.e. the endpoints of the lines are rounded when they get > thicker would look just as good as not rounding when dealing with > symbols. > Sorry, I should have been clearer. I don't mean the gnuplot line width. I mean the X linewidth set into the GC when drawing the symbol. X allows a linewidth of 0 to mean a fast line draw, not necessarily conforming to all the specs. ie it is allowed to be different on different X servers. You need to set the X GC linewidth to 1 to get a fully-conforming line. dd -- Dave Denholm <dde...@es...> http://www.esmertec.com |