Post Reply 
difference between command1 and command1_p
04-12-2018, 06:21 PM
Post: #1
difference between command1 and command1_p
I'm a new on programming so I decided to read the manual but I saw commands that are pretty the same as example blit and blit_p an so on. My question is what are the differences between the one whit and whiPout "_p"
Find all posts by this user
Quote this message in a reply
04-12-2018, 08:05 PM (This post was last modified: 04-12-2018 08:06 PM by DrD.)
Post: #2
RE: difference between command1 and command1_p
The user guide offers this (Program Commands Page 637):

Drawing

There are 10 built-in graphics variables in the HP Prime, called G0–G9. G0 is always the current screen graphic.
G1 to G9 can be used to store temporary graphic objects (called GROBs for short) when programming applications that use graphics. They are temporary and thus cleared when the calculator turns off.
Twenty-six functions can be used to modify graphics variables. Thirteen of them work with Cartesian coordinates using the Cartesian plane defined in the current app by the variables Xmin, Xmax, Ymin, and Ymax.
The remaining thirteen work with pixel coordinates where the pixel 0,0 is the top left pixel of the GROB, and 320, 240 is the bottom right. Functions in this second set have a _P suffix to the function name.

-Dale-
Find all posts by this user
Quote this message in a reply
04-13-2018, 05:02 AM
Post: #3
RE: difference between command1 and command1_p
(04-12-2018 08:05 PM)DrD Wrote:  The user guide offers this (Program Commands Page 637):
... the pixel 0, 0 is the top left pixel of the GROB, and 320, 240 is the bottom right. ...

ONE of those pairs must be wrong, since the screen isn't 321 × 241. The same bottom-right coordinates of 320, 240 are also cited on page 642.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
04-13-2018, 05:13 AM
Post: #4
RE: difference between command1 and command1_p
In Spanish

[Image: PPL3-009.png]

Artículo completo: https://carlos-icg.blogspot.pe/2017/09/p...prime.html

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
04-13-2018, 10:07 AM (This post was last modified: 04-13-2018 10:11 AM by DrD.)
Post: #5
RE: difference between command1 and command1_p
(04-13-2018 05:02 AM)Joe Horn Wrote:  
(04-12-2018 08:05 PM)DrD Wrote:  The user guide offers this (Program Commands Page 637):
... the pixel 0, 0 is the top left pixel of the GROB, and 320, 240 is the bottom right. ...

ONE of those pairs must be wrong, since the screen isn't 321 × 241. The same bottom-right coordinates of 320, 240 are also cited on page 642.

You're right, that's wrong, and that paints a completely different picture on this description. I mean, who would have even thought there would be any errors in the manual?Smile

To the trained eye, as anyone can plainly see, the top left coordinate is (0,0) and the bottom right coordinate is (319,239), totaling (x,y) = (320,240) pixels:

Code:

EXPORT PIX()
BEGIN 
  RECT();
  PIXON_P(0,0,#FF0000h); 
  PIXON_P(319,239,#FF0000h);
  WAIT;
END;

-Dale-
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)