Opened 13 years ago

Closed 13 years ago

#3434 closed patch (fixed)

new symbology line decoration with wrong orientation

Reported by: strk Owned by: wonder
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Symbology Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: Debian
Platform Version: Awaiting user input: no

Description

I'm showing 2 lines with new symbology and line decoration. Both lines are horizontal 2 points segments. The one above goes right-to-left. The one below goes left-to-right.

I would expect the line decoration (kind of an arrow head) to go in the direction of the line, but this is not happening for the right-to-left one.

Here's a snapshot: http://strk.keybit.net/tmp/qgis_new_symbology_line_decoration.png

For reference, WKT of the two lines: 10: LINESTRING(35 14,21 14) 13: LINESTRING(21 6,35 6)

This is qgis r15056

Attachments (2)

0001-Fix-math-used-to-compute-angles-of-horizontal-and-ve.patch (1.1 KB ) - added by strk 13 years ago.
3434.diff (1.2 KB ) - added by jef 13 years ago.
The attached patch is shorter, but I didn't test it - strk could you try it with your testcase, please?

Download all attachments as: .zip

Change History (7)

comment:1 by strk, 13 years ago

Further debugging shows that the problem has to do with the final segment being _exactly_ horizontal. I suspect there's en equal problem with perfectly vertical lines, as per this other snapshot: http://strk.keybit.net/tmp/ArrowHeadHell.png

comment:2 by strk, 13 years ago

Found and fixed. Attached format-patch (good to apply with git-am). Problem was for both vertical and horizontal lines. Fixed the vertical case (int vs. float) and the horizontal case (just missing).

comment:3 by mhugent, 13 years ago

Owner: changed from nobody to wonder
Type: bugpatch

by jef, 13 years ago

Attachment: 3434.diff added

The attached patch is shorter, but I didn't test it - strk could you try it with your testcase, please?

comment:4 by strk, 13 years ago

jef suggested this much simplified version: http://paste.debian.net/105578/ I've tested it and works fine.

in reply to:  4 comment:5 by jef, 13 years ago

Resolution: fixed
Status: newclosed

Replying to strk:

jef suggested this much simplified version: http://paste.debian.net/105578/ I've tested it and works fine.

Thanks. Applied in r15076.

Note: See TracTickets for help on using tickets.