HP Forums
LINE, LINE_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: LINE, LINE_P ? (/thread-3913.html)



LINE, LINE_P ? - Digitaldreams - 05-19-2015 08:34 AM

I've noticed many commands that output to the screen have two variants, either with or without '_P'. What is the difference ?, the manual shows both but tends to use the _P variant as an example.

Sorry for such simple questions Smile

Regards


RE: LINE, LINE_P ? - Didier Lachieze - 05-19-2015 08:54 AM

See the details under "Drawing" on page 531. In summary "_P" commands use pixel coordinates to address the screen, while non "_P" commands use Cartesian coordinates where the screen is mapped to a plane defined by Xmin, Xmax, Ymin, and Ymax.


RE: LINE, LINE_P ? - Digitaldreams - 05-19-2015 09:44 AM

Thanks Didier...not got much time to read through the manual...

Regards


RE: LINE, LINE_P ? - DrD - 05-19-2015 10:10 AM

Here's a little skeleton program that shows a way to use colors by name:

Code:

EXPORT test()
BEGIN
  local red:=rgb(255,0,0),
         green:=rgb(0,255,0),
         blue:=rgb(0,0,255),
         yellow:=rgb(255,255,0);
  rect();                                        // clear graphic screen  
  rect_p(75,1,265,16,blue);                      // present blue rectangle   
  textout_p("Digitaldreams",G0,130,4,2,yellow);  // put your name in the marquee 
  wait (-1);  // admire your name for awhile
END;

-Dale-


RE: LINE, LINE_P ? - Digitaldreams - 05-19-2015 11:38 AM

Thanks Dale, noticed the RGB command.....Gee the Prime draws circles fast !