[ROOT-8021] PaintLine not correctly drawn if out of pad Created: 26/Feb/16  Updated: 03/Mar/16  Resolved: 02/Mar/16

Status: Closed
Project: ROOT
Component/s: Graphics
Affects Version/s: < v5-28-00
Fix Version/s: 5.34/36, 6.08/00

Type: Bug Priority: High
Reporter: Fernando Hueso González Assignee: Olivier Couet
Resolution: Fixed Votes: 0
Labels: None
Environment:

Debian


Attachments: File opg2root.cpp     PNG File s10_hYX.png     PNG File s10_hYX.png     File tests.opg    
Development:

 Description   

I have a TLine, but it is not correctly drawn if one of the coordinates is out of the pad, ie, it is drawn as a vertical line, but it should be oblique. The bottom coordinate is changed somehow when drawing.

See attached script and data file, which is run through
root -l opg2root.cpp+(\"tests.opg\") -b -q -n

See then tests/s10_hYX.png, the green vertical line, (second screenshot).

If I uncomment line 1396, then the arrow is drawn correctly (first screenshot).



 Comments   
Comment by Olivier Couet [ 26/Feb/16 ]

The faulty bit is the -b option .. looking at it...

Also note:
https://root.cern.ch/rainbow-color-map
https://root.cern.ch/doc/master/classTColor.html#C06 (default kBird).

Comment by Fernando Hueso González [ 26/Feb/16 ]

Thanks for the tip, nice palettes.

Comment by Olivier Couet [ 26/Feb/16 ]

A work around:

l2.SetLineWidth(1);

Still investigating why wide lines do not work.

Comment by Olivier Couet [ 26/Feb/16 ]

I found a fix. I need to double check before committing it.

Comment by Olivier Couet [ 02/Mar/16 ]

Now fixed. Thanks for reporting.

Comment by Fernando Hueso González [ 03/Mar/16 ]

Thanks

Generated at Tue Sep 24 10:38:24 CEST 2019 using Jira 7.13.1#713001-sha1:5e06076c2d215a6f699b7e5c90ab2fae7ba5a1ce.