Post Reply 
Graphical output HP Prime
03-18-2015, 10:46 AM
Post: #1
Graphical output HP Prime
Try to output an Arc to the graphical screen with this code

HAngle:=0; //Degree
RECT_P(0,0,319,239,RGB(255,255,255);
ARC_P(0,159,119,50,40,90,RGB(0,0,0);
HAngle:=1; //Radians

The intension is to draw a arc starting at 40 Degree->90 Degree

What is doing wrong.
Find all posts by this user
Quote this message in a reply
03-18-2015, 11:11 AM (This post was last modified: 03-18-2015 11:16 AM by Thomas_Sch.)
Post: #2
RE: Graphical output HP Prime
(03-18-2015 10:46 AM)Powersoft Wrote:  Try to output an Arc to the graphical screen with this code

HAngle:=0; //Degree
RECT_P(0,0,319,239,RGB(255,255,255);
ARC_P(0,159,119,50,40,90,RGB(0,0,0);
HAngle:=1; //Radians

The intension is to draw a arc starting at 40 Degree->90 Degree
What is doing wrong.


- some missing brackets?
- HAngle seems to be ignored. The manual is probably not correct: "a1 and a2 follow the current angle mode and are optional. The default is a full circle."

Code:
EXPORT tst()
BEGIN
  HAngle:=0; //Degree
  local arc:=π/180;
  RECT_P(0,0,319,239,RGB(255,255,255));
  ARC_P(159,119,1,RGB(0,0,255));
  ARC_P(159,119,48,RGB(0,0,255));
  ARC_P(159,119,50,40*arc,90*arc,RGB(0,0,0));
  HAngle:=1; //Radians
  WAIT();
END;
Find all posts by this user
Quote this message in a reply
03-18-2015, 11:21 AM (This post was last modified: 03-18-2015 11:33 AM by DrD.)
Post: #3
RE: Graphical output HP Prime
The values for HAngle are inverted: 0 = Radians mode
1 = Degrees mode

You can directly test this via the HOME command line. It is shown otherwise in user guides, and has been reported for change.

Code:

EXPORT tst()
BEGIN
  HAngle:=1; //Degree
  RECT();  
  ARC_P(159,119,50,40,90,RGB(0,0,0));
  HAngle:=0; //Radians
  freeze;
END;
Find all posts by this user
Quote this message in a reply
03-18-2015, 06:37 PM
Post: #4
RE: Graphical output HP Prime
(03-18-2015 11:21 AM)DrD Wrote:  The values for HAngle are inverted: 0 = Radians mode
1 = Degrees mode
You can directly test this via the HOME command line. It is shown otherwise in user guides, and has been reported for change.
Hello Dale,
Thanks for the clarification! I didn't check the docs.
Once again, the community is very valuable.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: