HP Forums

Full Version: Strange issue with TEXTOUT_P
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can someone explain to me why sometimes the first char is not printed?
This issue occurs on both the emulator and on the real HP Prime.

Code:
EXPORT TEXTOUT_ISSUE()
BEGIN
DIMGROB_P(G1,512,40);
RECT_P();
RECT_P(G1);
//textout using width 510 at position 0,0
TEXTOUT_P("ABC / 1",G1,0,0,7,#FFFFFF,510,0); //OK
BLIT_P(G1);
WAIT(-1);
RECT_P(G1);
//textout using width 511 at position 0,0
TEXTOUT_P("ABC / 2",G1,0,0,7,#FFFFFF,511,0); //the "A" is missing
BLIT_P(G1);
WAIT(-1);
RECT_P(G1);
//textout using width 511 at position 1,1
TEXTOUT_P("ABC / 3",G1,1,1,7,#FFFFFF,511,0); //OK
BLIT_P(G1);
WAIT(-1);
RECT_P(G1);
//textout using width 511 at position -5,-5
TEXTOUT_P("ABC / 4",G1,-5,-5,7,#FFFFFF,511,0); //the "A" is missing
BLIT_P(G1);
WAIT(-1);
RECT_P(G1);
//textout using width 510 at position -5,-5
TEXTOUT_P("ABC / 5",G1,-5,-5,7,#FFFFFF,510,0); //OK
BLIT_P(G1);
WAIT(-1);
END;

EDIT:
It occurs only when the width is equal to 511 and the x-coordinate is equal or less than 0.
Hello,

I will put it in the issue list.

Cyrille
Is it normal that the maximum value of the x coordinate inj TEXTOUT_P can only be 511? Currently it is not possible to print a text in area of GROB where x is equal 512 and above.
Off the top of my head, I'd suspect something might be overflowing internally here. I am curious why you are trying to print up to 500+ pixels when you screen is not that wide...?
I just wanted to inform others about it, because other graphical commands like RECT_P or LINE_P work in this area (512+) and the TEXTOUT_P is the only exception.
I think it might be useful only for games with scrolling (for example), but rather not for professional use.
However, I still think that it should work since it is possible to create GROB wider than 512 pixels.
Reference URL's