Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-05

outtextXY not moving pointer

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

James Richters

I am using a combination of outtext and outtextxy for an application using the graph unit on Windows. I am noticing that outtextxy is not moving the pointer to the end of text as it is supposed to. Outtext does move the pointer, outtextxy is not moving the pointer.

The documentation here:
http://www.math.uni-leipzig.de/pool/tuts/FreePascal/units/node9.html#pro:Out Text

And here : https://www.freepascal.org/docs-html/rtl/graph/outtextxy.html

states that both outtext and outtextxy are supposed to move the current position to the end of the text.

Any idea's why this is not working or how to get it fixed?

Jim

8.4.50 OutText

Declaration

Procedure OutText (Const TextString : String);

Description

OutText puts TextString on the screen, at the current pointer position, using the current font and text settings. The current position is moved to the end of the text.

Errors

None.

See also

OutTextXY
<http://www.math.uni-leipzig.de/pool/tuts/FreePascal/units/node9.html#pro:Ou tTextXY>

8.4.51 OutTextXY

Declaration

Procedure OutTextXY (X,Y : Integer; Const TextString : String);

Description

OutText puts TextString on the screen, at position (X,Y), using the current font and text settings. The current position is moved to the end of the text.

Errors

None.

See also

OutText
<http://www.math.uni-leipzig.de/pool/tuts/FreePascal/units/node9.html#pro:Ou tText>

Marco van de Voort
to James Richters

In our previous episode, James Richters said:

Any idea's why this is not working or how to get it fixed?

My guess it is a doc bug since the packages/graph/inc/graphh.inc says

{ 17th april 1999: } { * GraphDefaults() would not reset CP } { + GetX(), GetY(), MoveTo() checked for viewports } { * OutTextXY() should not update the CP } { * ClearViewPort() would not update the CP } { * ClearDevice() would not update the CP } { * Sector() would update the CP by calling LineTo } { * Bar3D() would update the CP } { * PieSlice() would update the CP

which seems to indicate that not updating the CP (Cursor position) is a deliberate choice.

That said, maybe nowadays a default parameter can be used to make that optional.