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.
(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;
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;
(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.