View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0035760 | FPC | RTL | public | 2019-06-24 19:01 | 2019-07-05 18:26 |
Reporter | Bloodbatgot | Assigned To | Sven Barth | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | PC | OS | Windows | ||
Product Version | 3.0.4 | ||||
Fixed in Version | 3.3.1 | ||||
Summary | 0035760: Graph unit's lines are drawn wrong when line style is ThickWidth | ||||
Description | When drawing lines using the graph unit and using SetLineStyle(SolidLn, 0, ThickWidth) lines are either drawn incomplete (the bottom pixels begin drawing at the last pixel) or are "leaking" on the right side, this also happens for the go32v2 target and have tested under Windows 7 as well. Turbo Pascal draws such lines properly. (I have attached graphics from GO32V2, Win32 and a TP compiled version). | ||||
Steps To Reproduce | Create a simple program, use the graph unit, init graphics, change line style with SetLineStyle(SolidLn, 0, ThickWidth) and use Line to draw a line anywhere. A sample program is attached. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 42327 | ||||
FPCOldBugId | |||||
FPCTarget | - | ||||
Attached Files |
|
|
grphtest.pas (662 bytes)
program grphtest; {$IFDEF FPC} {$MODE TP} {$ENDIF} uses Graph, Crt {$IFDEF WIN32}, WinCRT {$ENDIF}; const Msg = 'Press any key'; var GDriver: integer; GMode: integer; XPos: integer; YPos: integer; begin {$IFNDEF FPC} GDriver := Detect; GMode := 0; {$ELSE} GDriver := D8bit; GMode := m640x480; {$ENDIF} InitGraph(GDriver, GMode, ''); SetLineStyle(SolidLn, 0, ThickWidth); XPos := GetMaxX div 2 - 100 div 2; YPos := GetMaxY div 2 - 1; Line(XPos, YPos, XPos + 100, YPos); OutTextXY(GetMaxX - TextWidth(Msg) - 10, GetMaxY - TextHeight(Msg) - 10, Msg); Readkey; CloseGraph; end. |
|
Fix for the error in this report. graph.inc.patch (612 bytes)
Index: packages/graph/src/inc/graph.inc =================================================================== diff --git a/branches/fixes_3_0/packages/graph/src/inc/graph.inc b/branches/fixes_3_0/packages/graph/src/inc/graph.inc --- a/branches/fixes_3_0/packages/graph/src/inc/graph.inc (revision 42321) +++ b/branches/fixes_3_0/packages/graph/src/inc/graph.inc (working copy) @@ -261,7 +261,7 @@ { thick width } hline(x1,x2,y2-1); hline(x1,x2,y2); - hline(x2,x2,y2+1); + hline(x1,x2,y2+1); end; end else |
|
Thank you for the patch. Please test and close if okay |
|
Fixed. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-06-24 19:01 | Bloodbatgot | New Issue | |
2019-06-24 19:01 | Bloodbatgot | File Added: go32v2.png | |
2019-06-24 19:01 | Bloodbatgot | File Added: win32.png | |
2019-06-24 19:01 | Bloodbatgot | File Added: turbo.png | |
2019-06-24 19:01 | Bloodbatgot | File Added: grphtest.pas | |
2019-07-03 11:58 | Bloodbatgot | File Added: graph.inc.patch | |
2019-07-03 11:58 | Bloodbatgot | Note Added: 0117044 | |
2019-07-05 14:41 | Sven Barth | Assigned To | => Sven Barth |
2019-07-05 14:41 | Sven Barth | Status | new => resolved |
2019-07-05 14:41 | Sven Barth | Resolution | open => fixed |
2019-07-05 14:41 | Sven Barth | Fixed in Version | => 3.3.1 |
2019-07-05 14:41 | Sven Barth | Fixed in Revision | => 42327 |
2019-07-05 14:41 | Sven Barth | FPCTarget | => - |
2019-07-05 14:41 | Sven Barth | Note Added: 0117081 | |
2019-07-05 18:26 | Bloodbatgot | Status | resolved => closed |
2019-07-05 18:26 | Bloodbatgot | Note Added: 0117088 |