Cannot set Canvas.Pen.Width to zero
Original Reporter info from Mantis: Petr-K
-
Reporter name:
Original Reporter info from Mantis: Petr-K
- Reporter name:
Description:
Fpc implementation restricts Width >= 1.
fppen.inc:
procedure TFPCustomPen.SetWidth (AValue : Integer);
begin
if AValue < 1 then
FWidth := 1
else
FWidth := AValue;
end;
In Delphi looks Widths 0 and 1 the same on the screen, but on the printer looks different.
Here is a little patch to change this restriction to Width >= 0
===================================================================
--- packages/fcl-image/src/fppen.inc (revision 22000)
+++ packages/fcl-image/src/fppen.inc (working copy)
@@ -21,8 +21,8 @@
procedure TFPCustomPen.SetWidth (AValue : Integer);
begin
- if AValue < 1 then
- FWidth := 1
+ if AValue < 0 then
+ FWidth := 0
else
FWidth := AValue;
end;
Mantis conversion info:
- Mantis ID: 23662
- Fixed in version: 3.0.0
- Fixed in revision: 26722 (#576eadf6)
- Monitored by: » Petr-K (Petr-K)
- Target version: 3.0.0