Post Reply 
Is There a Python Window Command?
11-26-2021, 01:09 PM (This post was last modified: 11-28-2021 01:14 AM by toml_12953.)
Post: #1
Is There a Python Window Command?
I can use Python graphics on Prime with no problem but they're pixel-oriented and I have to manipulate the graphics to fit the screen. Is there a way to redefine the screen limits the way you can do in HPPL? I tried setting Xmin, Xmax, Ymin and Ymax but no change. I also tried eval() with those variables. Are there other graphics commands for line() and pixon() that respect the set screen coordinates? I was sure I had some Prime Python documentation but, of course, I can't find it now.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
11-28-2021, 04:26 PM
Post: #2
RE: Is There a Python Window Command?
The 20211125 version of the Prime firmware has what I need.

get_cartesian() and set_cartesian() functions along with adding _c to the drawing functions will do what I want.

Example: line_c(x1,y1,x2,y2,color) uses Cartesian coordinates.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
11-28-2021, 05:21 PM
Post: #3
RE: Is There a Python Window Command?
(11-28-2021 04:26 PM)toml_12953 Wrote:  The 20211125 version of the Prime firmware has what I need.

get_cartesian() and set_cartesian() functions along with adding _c to the drawing functions will do what I want.

Example: line_c(x1,y1,x2,y2,color) uses Cartesian coordinates.

Apparently, however, fillrect_c doesn't work.
Example:

fillrect_c(0,0,0,320,200,0,0)

should fill the screen with black when Xmin=0, Xmax=319, Ymin=0, Ymax=199

but it shows no black at all.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 




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