View Issue Details

IDProjectCategoryView StatusLast Update
0033951FPCOtherpublic2019-09-20 18:11
ReporterPetru SimionescuAssigned ToMarco van de Voort 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionwon't fix 
PlatformOSWinOS Version8.1
Product Version3.0.4Product Build 
Target VersionFixed in Version 
Summary0033951: SetLineStyle and SetTextStyle
DescriptionSetLineStyle, if set to Dashedln or DottedLn, works with Lines but not with circles and arches.

SetTextStyle, works only as DefaultFont. I am interested in using SmallFont. Is there a way of adding it?

Many thanks!
Steps To ReproduceProgram LinesAndFonts;

uses Graph;

var GraphDriver, GraphMode: integer;

BEGIN
  GraphDriver:= DETECT;
  InitGraph(GraphDriver,GraphMode, ' ' );
  if (GraphResult <> grOk) then BEGIN
    Writeln('ImnitGraph error: ', GraphErrorMsg(GraphDriver));
    Halt;
  END;

  SetColor(LightRed);
  SetTextStyle(TriplexFont,0,2);
  OutTextXY(100,180,'Dashed');

  SetLineStyle(DashedLn, 0, 1);
  Line (100,200, 300, 600); {OK }
  Arc (200,400, 90, 270 ,120); {Not OK}
  Circle(200,400, 80); {Not OK}

  SetColor(Magenta);
  SetTextStyle(SmallFont,0,2); {font will remain DefaultFont}
  OutTextXY(400,180,'Dotted');
  SetLineStyle(DottedLn, 0, 1);
  Line (400,200, 600, 600); {OK }
  Arc (500,400, 90, 270 ,120); {Not OK}
  Circle(500,400, 80); {Not OK}

  ReadLn;

  CloseGraph;
END.

Tagsgraph
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Marco van de Voort

2018-08-30 15:01

manager   ~0110375

Graphresult reports "font not found" = -8. Did you copy the relevant .chr stroked fonts in the applications dir ?

triplexfont seems to be 'trip.chr' and small font 'litt.chr' I tried to add them, but graphresult remains -8.

I suspect the default font is windows bitmapped, not stroked.

Ladislav Lacina

2018-09-02 23:03

reporter   ~0110465

"SetLineStyle, if set to Dashedln or DottedLn, works with Lines but not with circles and arches."

True - but it is the same behaviour like in Turbo pascal so it should not be considered as a bug.

Marco van de Voort

2019-09-20 18:11

manager   ~0118140

As Ladislav says, TP does the same, and graph is a TP compatibility unit.

Issue History

Date Modified Username Field Change
2018-07-08 04:07 Petru Simionescu New Issue
2018-08-24 14:13 Marco van de Voort Tag Attached: graph
2018-08-30 15:01 Marco van de Voort Note Added: 0110375
2018-09-02 23:03 Ladislav Lacina Note Added: 0110465
2019-09-20 18:11 Marco van de Voort Assigned To => Marco van de Voort
2019-09-20 18:11 Marco van de Voort Status new => resolved
2019-09-20 18:11 Marco van de Voort Resolution open => won't fix
2019-09-20 18:11 Marco van de Voort FPCTarget => -
2019-09-20 18:11 Marco van de Voort Note Added: 0118140