Post Reply 
Image/ sketch in program
05-24-2023, 08:03 PM (This post was last modified: 05-24-2023 08:34 PM by Amer7.)
Post: #9
RE: Image/ sketch in program
(05-18-2023 10:10 PM)matalog Wrote:  I can only refer you to the manual I have been mentioning and the pages I already mentioned, they cover all of the drawing things you can use on the HP Prime.

Pages 640 and 641 tell you how to draw lines between 2 points, and also how to draw rectangles (even rectangles with lines of different colour around them.

You can ues the LINE_P and RECT_P to do the things that you want.

Hey I managed to write the code. With the pixels, and while do loop. The issue is I'm facing

   

This is x=10, and y=10;
The HP prime has coordinate beginning in top left corner 0,0
Is it possible to make it to be coordinate beginning 0,0 from lower left corner?
-I have to change the basis of coordinates- will try to find how
Code:
EXPORT tacka()
BEGIN
LOCAL xa,ya,xb,yb,xc,yc;
LOCAL yt,xt;



xa:=4500432.123;
ya:=6700220.120;
xb:=4521452.123;
yb:=6812223.223;
xc:=4900111.333;
yc:=6600444.444;
xt:=5233212.089;
yt:=6422666.666;

PRINT("yc="+yc);
PRINT("xc="+xc);
PRINT("ya="+ya);
PRINT("xa="+xa);
PRINT("yb="+yb);
PRINT("xb="+xb);
PRINT("yT="+yt);
PRINT("xT="+xt);

PRINT("_________________________");

WHILE xa>230 DO
xa:=xa/2;
END;

WHILE ya>300 DO
ya:=ya/2;
END;

WHILE xb>230 DO
xb:=xb/2;
END;

WHILE yb>300 DO
yb:=yb/2;
END;

WHILE xc>230 DO
xc:=xc/2;
END;
WHILE yc>300 DO
yc:=yc/2;
END;

WHILE xt>230 DO
xt:=xt/2;
END;
WHILE yt>300 DO
yt:=yt/2;
END;



PRINT("yc="+yc);
PRINT("xc="+xc);
PRINT("ya="+ya);
PRINT("xa="+xa);
PRINT("yb="+yb);
PRINT("xb="+xb);
PRINT("yT="+yt);
PRINT("xT="+xt);
WAIT(-1);
RECT();

//Tacka A
TEXTOUT_P("TACKA A",ya-10,xa-10,1,RGB(200,100,0));
RECT_P(ya,xa,ya+5,xa+5,RGB(225,100,0));
PIXON_P(ya,xa,RGB(225,100,0));

//TackaB
TEXTOUT_P("TACKA B",yb-10,xb-10,1,RGB(100,100,0));
RECT_P(yb,xb,yb+5,xb+5,RGB(100,100,0));
PIXON_P(yb,xb,RGB(100,100,0));
//TACKA C
TEXTOUT_P("TACKA C",yc-10,xc-10,1,RGB(0,100,0));
RECT_P(yc,xc,yc+5,xc+5,RGB(0,100,0));
PIXON_P(yc,xc,RGB(0,100,0));
//Tacka T
TEXTOUT_P("TACKA T",yt-10,xt-10,1,RGB(225,0,0));
RECT_P(yt,xt,yt+5,xt+5,RGB(225,0,0));
PIXON_P(yt,xt,RGB(225,0,0));
//Linije 

LINE_P(ya,xa,yb,xb,RGB(200,200,200));
LINE_P(ya,xa,yt,xt,RGB(225,0,0));
LINE_P(yt,xt,yc,xc,RGB(225,0,0));
LINE_P(yt,xt,yb,xb,RGB(200,200,200));
LINE_P(yc,xc,yb,xb,RGB(200,200,200));
WAIT(−1);

END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Image/ sketch in program - Amer7 - 05-10-2023, 10:25 AM
RE: Image/ sketch in program - matalog - 05-10-2023, 03:36 PM
RE: Image/ sketch in program - Amer7 - 05-15-2023, 10:34 AM
RE: Image/ sketch in program - Amer7 - 05-17-2023, 11:30 AM
RE: Image/ sketch in program - matalog - 05-17-2023, 07:28 PM
RE: Image/ sketch in program - matalog - 05-17-2023, 07:27 PM
RE: Image/ sketch in program - Amer7 - 05-18-2023, 05:21 PM
RE: Image/ sketch in program - matalog - 05-18-2023, 10:10 PM
RE: Image/ sketch in program - Amer7 - 05-24-2023 08:03 PM
RE: Image/ sketch in program - matalog - 05-24-2023, 10:24 PM
RE: Image/ sketch in program - Amer7 - 05-25-2023, 11:18 AM
RE: Image/ sketch in program - matalog - 05-25-2023, 12:37 PM



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