Issue 122456 - Thick line drawn wrongly
Summary: Thick line drawn wrongly
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
Depends on:
Reported: 2013-06-04 16:59 UTC by hanya
Modified: 2013-07-12 16:42 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

Screen shot for thick line (118.84 KB, image/png)
2013-06-04 18:09 UTC, hanya
no flags Details
Screencast showing the problem (147.42 KB, video/webm)
2013-06-14 14:15 UTC, rgb
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description hanya 2013-06-04 16:59:36 UTC
Lines having thickness drawn slipped from the original points.
- Draw line on drawing page.
- Set line width to the line, like 1 cm thick.
-> the line drawn to slipped position.
On AOO400m2(Build:9701)  -  Rev. 1489108, Linux 32bit and 64bit.
Comment 1 Regina Henschel 2013-06-04 17:20:22 UTC
I cannot reproduce it on Windows r1488548. Do you work in Draw? How do you set the thickness of the line? Is it a difference which is visible, or only some 1/100cm?
Can you attach a screenshot of the marked (with handle) original line and of the marked thick line, with grid in background?
Comment 2 hanya 2013-06-04 18:09:08 UTC
Created attachment 80773 [details]
Screen shot for thick line

Here is the screen show contains the line drawn with newly created profile on Draw. 
Width of the line set by Width field of the Line dialog shown in the screen shot.
This is happen on other drawing pages on such as Writer, Calc.

> and 64bit.
Sorry, 64 bit version came from build bot, AOO400m2(Build:9701)  -  Rev. 1487531
2013-05-30_04:09:45 - Rev. 1487719
Comment 3 hanya 2013-06-06 13:54:44 UTC
I found the following build, maybe build by buildbot. Thin line is ok on Linux 64bit, Xubuntu 12.04.
AOO400m1(Build:9700)  -  Rev. 1479357
2013-05-06_04:12:41 - Rev. 1479464
Comment 4 hanya 2013-06-06 14:44:34 UTC
Not confirmed yet.
Comment 5 Armin Le Grand 2013-06-07 08:30:15 UTC
ALG: I am really surprised by that screenshot, I would have said before this is not possible ;-). Well, I could not reproduce on Win7, looking for Xubuntu with current trunk...
Comment 6 Armin Le Grand 2013-06-14 13:50:15 UTC
ALG: Could now reporoduce, reactivating, taking a look.
Comment 7 Armin Le Grand 2013-06-14 14:09:21 UTC
ALG: Error is that in X11SalGraphics::drawPolyLine line 1241 the source polygon is transformed to create the neede tesselation by halflinewidth. This goes wrong for fat lines, of course, and should always move for (0.5, 0.5). It happens in AOO4.0 since it gets called for fat lines now which was probably not the case for AOO3.4.1. This is due to my improvements in vclpixelprocessor2d.cxx in the case PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D when the shortcut tryDrawPolygonStrokePrimitive2DDirect is taken (speedup fat/transparent line drawing on systems that support it, esp. Windows).
Changing X-specific VCL code, checking (again, already took a look)...
Comment 8 Armin Le Grand 2013-06-14 14:11:11 UTC
ALG: Checked in, done. Thanks for finding this!
Comment 9 rgb 2013-06-14 14:15:13 UTC
Created attachment 80849 [details]
Screencast showing the problem

I'm experiencing the same problem with 

AOO400m2(Build:9701)  -  Rev. 1491860
2013-06-11 15:16:25 (Tue, 11 Jun 2013) - Linux x86_64

on openSUSE 12.2, 64 bits, KDE SC 4.8.5. I just open Draw, pick the line drawing tool and draw a line. Handlers are misplaced even with thin lines: just by drawing a 0.02cm wide line and apply a 800% zoom I can see the misplaced handler. Separation grows with line width. 

Handlers are always displaced a bit upwards and to the left.

Attached a short screencast on webm format.
Comment 10 rgb 2013-06-14 14:17:21 UTC
(In reply to Armin Le Grand from comment #8)
> ALG: Checked in, done. Thanks for finding this!

Ops!, you fixed it while I was doing and submitting the video. Anyway, thanks!