[Bug 1021803] New: Wrong lineends in XDrawLine()
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803 Bug ID: 1021803 Summary: Wrong lineends in XDrawLine() Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: x86-64 OS: openSUSE 42.2 Status: NEW Severity: Normal Priority: P5 - None Component: X.Org Assignee: xorg-maintainer-bugs@forge.provo.novell.com Reporter: mse00000@gmail.com QA Contact: xorg-maintainer-bugs@forge.provo.novell.com Found By: --- Blocker: --- Created attachment 711516 --> http://bugzilla.opensuse.org/attachment.cgi?id=711516&action=edit Testprogram While testing MSEide+MSEgui on Leap 42.2 on a Acer Veriton M4640G I found that XDrawLine() has wrong line ends, see attached test-program and screenshot (wrong.png). 32 bit openSUSE 13.2 on the same machine shows the correct result (ok.png). Xorg log is attached. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c1
--- Comment #1 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c2
--- Comment #2 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c3
--- Comment #3 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c4
Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c5
--- Comment #5 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c6
Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c7
Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c8
--- Comment #8 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c9
--- Comment #9 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c10
--- Comment #10 from Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c11
Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c12
--- Comment #12 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c13
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c14
--- Comment #14 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c17
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c18
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c19
--- Comment #19 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c20
--- Comment #20 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c21
--- Comment #21 from Martin Schreiber
From this point onwards, you're using Xorg's software drawing routines, which should be clearly specified and produce reproducible output, unline zero width
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c22
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c23
--- Comment #23 from Martin Schreiber
Does switching to 1 width lines on the toolkit side solve your issue?
No, see attachments XSetLineAttributes. From https://tronche.com/gui/x/xlib/GC/manipulating.html#cap-style " The cap-style defines how the endpoints of a path are drawn: CapNotLast This is equivalent to CapButt except that for a line-width of zero the final endpoint is not drawn. CapButt The line is square at the endpoint (perpendicular to the slope of the line) with no projection beyond. CapRound The line has a circular arc with the diameter equal to the line-width, centered on the endpoint. (This is equivalent to CapButt for line-width of zero). CapProjecting The line is square at the end, but the path continues beyond the endpoint for a distance equal to half the line-width. (This is equivalent to CapButt for line-width of zero). " so it looks to me line endpoints are well defined in Xlib. A line draw command which sometimes draws start-/endpoints and sometimes not is pretty useless IMHO. And MSEide+MSEgui is also a modern GUI-toolkit which does not "mostly pushing huge images". ;-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c24
--- Comment #24 from Max Staudt
so it looks to me line endpoints are well defined in Xlib. A line draw command which sometimes draws start-/endpoints and sometimes not is pretty useless IMHO.
Yes, I fully agree. So if Xorg does not do the right thing, that's a bug with Xorg, not openSUSE ;)
And MSEide+MSEgui is also a modern GUI-toolkit which does not "mostly pushing huge images". ;-)
It wasn't my intention to downplay MSEide+MSEgui, rather I was making the point that toolkits should as yours deserve to be rendered correctly! In any case, unlike GTK/Qt, you're targeting X11 instead of pushing huge images, which is a completely valid thing to do. And you expect the server to behave correctly (validly so), so if it doesn't, then that's a valid Xorg bug in my opinion. That's what I was getting at. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c25
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c26
--- Comment #26 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c27
--- Comment #27 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c28
--- Comment #28 from Martin Schreiber
Okay, something strange happened. I think I reproduced it once, and now I can no longer reproduce the bug with line width 1.
Again our mails crossed. :-) The difference is CapButt/CapProjecting. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c29
--- Comment #29 from Max Staudt
Is it correct that in order to get the old behavior with CapButt/0-linewidth on newer X11 implementations one can set linewidth to 1 and lineend to CapProjecting on solid lines and for dashed lines one has to set linewidth to 1 and lineend to CapButt?
Well, I wouldn't compare this to 0-width, since upstream said those are poorly specified. The question is, how are 1-width lines specified? And I expect Xorg's software renderer to do the right thing with widths of 1 or more. Basically, widths of 0 are a gimmick for fast, inaccurate output. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c30
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c31
--- Comment #31 from Martin Schreiber
From 1999 when I started MSEgui up to openSUSE 13.2 I never encountered another Xlib 0-line behavior with CapButt than painting the first and last line-points and to draw a 2/2 dashed line as 2/2. So we can rephrase the question as:
Is it correct that in order to get the first and last point of a 1 pixel width line one must set linewidth to 1 and lineends to CapProjecting on solid lines and for dashed lines one must set linewidth to 1 and lineend to CapButt? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c32
--- Comment #32 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c33
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c34
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c35
--- Comment #35 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c36
--- Comment #36 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c37
--- Comment #37 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c38
--- Comment #38 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c39
--- Comment #39 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c40
--- Comment #40 from Martin Schreiber
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c41
--- Comment #41 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c42
--- Comment #42 from Max Staudt
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803
http://bugzilla.opensuse.org/show_bug.cgi?id=1021803#c43
Max Staudt
participants (1)
-
bugzilla_noreply@novell.com