HP Forums
Strange issue with TEXTOUT_P - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Strange issue with TEXTOUT_P (/thread-4879.html)



Strange issue with TEXTOUT_P - komame - 10-04-2015 08:17 PM

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.


RE: Strange issue with TEXTOUT_P - cyrille de brébisson - 10-05-2015 06:35 AM

Hello,

I will put it in the issue list.

Cyrille


RE: Strange issue with TEXTOUT_P - komame - 10-05-2015 10:25 AM

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.


RE: Strange issue with TEXTOUT_P - Tim Wessman - 10-05-2015 03:39 PM

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...?


RE: Strange issue with TEXTOUT_P - komame - 10-05-2015 04:31 PM

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.