outtextXY not moving pointer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

outtextXY not moving pointer

Zaaphod

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:OutText

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


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

 


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: outtextXY not moving pointer

Marco van de Voort
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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal