View Issue Details

IDProjectCategoryView StatusLast Update
0027620LazarusTAChartpublic2015-12-26 12:08
ReporterValdas JankūnasAssigned ToZeljan Rikalo 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformOSLinux 64bit, Kubuntu 14.04OS Version
Product Version1.5 (SVN)Product Build48165 
Target Version1.4Fixed in Version1.5 (SVN) 
Summary0027620: [Qt] points of LineSeries are drawn with different line width
Description - On form add TChart,
 - in Chart add LineSeries;
 - add several DataPoints in to LineSeries;
 - LineSeries -> ShowPoints := TRUE;
 - LineSeries -> Pointer -> Pen -> Width := 4 -> all data points are drawn with bold border.

 But: LineSeries -> Pointer -> Brush -> Style := bsClear -> only first point is drawn with bold border, others - with thin (see attached screenshot);

 Also I attached test project.
TagsNo tags attached.
Fixed in Revision48177
LazTarget1.4
WidgetsetQT
Attached Files
  • diamond.png (111,453 bytes)
    diamond.png (111,453 bytes)
  • test_project.zip (128,642 bytes)
  • qtworkaroundforpen.diff (410 bytes)
    Index: qtobjects.pas
    ===================================================================
    --- qtobjects.pas	(revision 48175)
    +++ qtobjects.pas	(working copy)
    @@ -2927,6 +2927,8 @@
       i: integer;
       LastPoint: TPoint;
     begin
    +  if PtrUInt(SelPen) = PtrUInt(Pen) then
    +    setPen(SelPen);
       GetMem(QtPoints, NumPts * SizeOf(TQtPoint));
       for i := 0 to NumPts - 2 do
         QtPoints[i] := QtPoint(P[i].x, P[i].y);
    

Relationships

related to 0029256 closedZeljan Rikalo Qt: optimization of DCSetPixel 

Activities

Valdas Jankūnas

2015-03-07 20:34

reporter  

diamond.png (111,453 bytes)
diamond.png (111,453 bytes)

Valdas Jankūnas

2015-03-07 20:35

reporter  

test_project.zip (128,642 bytes)

wp

2015-03-09 00:40

developer   ~0081739

In r48174, the clear symbols are painted by the Polygon method instead of Polyline. This fixes the painting issues for qt.

I am leaving the issue open because my fix is just a workaround but does not solve the root cause in qt.

Zeljan Rikalo

2015-03-09 10:59

developer   ~0081744

Last edited: 2015-03-09 11:21

View 2 revisions

afair polygon has been changed some time ago in qtlcl....maybe that could be problem.
EDIT: forget this note.

Zeljan Rikalo

2015-03-09 11:20

developer   ~0081746

Do we have any tests for polyline ? Qt completely paints polyline, and it looks good in implementation. Could be Qt bug.

Zeljan Rikalo

2015-03-09 11:48

developer   ~0081749

hm...painter pen is out of sync....qtlcl bug.

Zeljan Rikalo

2015-03-09 11:53

developer  

qtworkaroundforpen.diff (410 bytes)
Index: qtobjects.pas
===================================================================
--- qtobjects.pas	(revision 48175)
+++ qtobjects.pas	(working copy)
@@ -2927,6 +2927,8 @@
   i: integer;
   LastPoint: TPoint;
 begin
+  if PtrUInt(SelPen) = PtrUInt(Pen) then
+    setPen(SelPen);
   GetMem(QtPoints, NumPts * SizeOf(TQtPoint));
   for i := 0 to NumPts - 2 do
     QtPoints[i] := QtPoint(P[i].x, P[i].y);

Zeljan Rikalo

2015-03-09 11:54

developer   ~0081750

I've uploaded workaround for qtlcl, it's not patch, just note for me where bug should be searched. Pen in TQtDeviceContext is different from painter pen for some reason, so must find out how and where sets pen out of TQtDeviceContext.setPen() and it does not restore it to original value.

wp

2015-03-09 12:49

developer   ~0081752

Yes, after applying your patch, the symbols paint correctly even with the polyline in the TAChart code.

Zeljan Rikalo

2015-03-09 15:25

developer   ~0081761

I know that :). As first I must find out where is pen setted up out of sync with TQtDeviceContext Pen().

Zeljan Rikalo

2015-03-09 16:01

developer   ~0081762

Please test and close if ok.
I've found that pen was out of sync with device context pen, so now it's fixed and will be merged to 1.4.
@wp will you please restore your patch to TAChart to the previous value which uses polyline ?

wp

2015-03-09 16:50

developer   ~0081765

TAChart patch has been reverted. Thanks.

Valdas Jankūnas

2015-03-09 19:18

reporter   ~0081775

Thanks.

Issue History

Date Modified Username Field Change
2015-03-07 20:34 Valdas Jankūnas New Issue
2015-03-07 20:34 Valdas Jankūnas File Added: diamond.png
2015-03-07 20:35 Valdas Jankūnas File Added: test_project.zip
2015-03-08 09:00 Zeljan Rikalo Assigned To => Zeljan Rikalo
2015-03-08 09:00 Zeljan Rikalo Status new => assigned
2015-03-08 23:43 wp LazTarget => -
2015-03-08 23:43 wp Status assigned => confirmed
2015-03-09 00:40 wp Note Added: 0081739
2015-03-09 10:59 Zeljan Rikalo Note Added: 0081744
2015-03-09 11:20 Zeljan Rikalo Note Added: 0081746
2015-03-09 11:20 Zeljan Rikalo Status confirmed => feedback
2015-03-09 11:21 Zeljan Rikalo Note Edited: 0081744 View Revisions
2015-03-09 11:48 Zeljan Rikalo Note Added: 0081749
2015-03-09 11:53 Zeljan Rikalo File Added: qtworkaroundforpen.diff
2015-03-09 11:54 Zeljan Rikalo Note Added: 0081750
2015-03-09 12:49 wp Note Added: 0081752
2015-03-09 15:25 Zeljan Rikalo Note Added: 0081761
2015-03-09 16:01 Zeljan Rikalo Fixed in Revision => 48177
2015-03-09 16:01 Zeljan Rikalo LazTarget - => 1.4
2015-03-09 16:01 Zeljan Rikalo Note Added: 0081762
2015-03-09 16:01 Zeljan Rikalo Status feedback => resolved
2015-03-09 16:01 Zeljan Rikalo Fixed in Version => 1.5 (SVN)
2015-03-09 16:01 Zeljan Rikalo Resolution open => fixed
2015-03-09 16:01 Zeljan Rikalo Target Version => 1.4
2015-03-09 16:50 wp Note Added: 0081765
2015-03-09 19:18 Valdas Jankūnas Note Added: 0081775
2015-03-09 19:18 Valdas Jankūnas Status resolved => closed
2015-12-26 12:08 Zeljan Rikalo Relationship added related to 0029256