|
Post by danuthorincas on Jul 5, 2019 8:42:09 GMT
'I cannot find command for print circle generate by folowing program'I want to copy the circle to paste
NOMAINWIN
WindowWidth=400
WindowHeight=400
OPEN "Hold Up A Flag" FOR GRAPHICS_nsb AS #a
PRINT #a, "trapclose [quit]"
PRINT #a, "DOWN"
PRINT #a, "SIZE 5"
PRINT #a, "SET 200 200" '< the center of our window
FOR k=0 TO 360 STEP 6 'Begin at 0° and stop at 360°
angle=k
GOSUB [doMath] '< let Artie and assistants work out the math
PRINT #a, "SET "; x2; " "; y2 '< Pablo's crew will mark the point
GOSUB [pause]
NEXT k
WAIT
[quit]
CLOSE #a
END
[doMath]
angle=(angle/57.29577951) 'Convert degrees to radians
x2=(200+(sin(angle)*100)) 'Calculate x2 y2 coordinates from origin
y2=(200-(cos(angle)*100)) 'for point on C with radius 100
RETURN
[pause]
TIMER 25, [resume]
WAIT
[resume]
TIMER 0
RETURN
|
|
|
Post by tsh73 on Jul 5, 2019 9:54:52 GMT
Please explain your problem.
For now your program draws circle of dots
If you wait to print this picture (to printer), add
#a, "flush" #a, "print xga"
between " NEXT k" and " WAIT".
If you want to copy this picture to clipboard, just press Alt-PrintScreen keys
If you want to save this picture as bitmap, do
#a, "getbmp bmpName 0 0 400 400" bmpsave "bmpName", "filename.bmp"
again between " NEXT k" and " WAIT" - and look for filename.bmp (it should be in same place your basic program is)
|
|
|
Post by jarych on Jul 5, 2019 10:34:36 GMT
tsh73 I am confused about the line of code "PRINT xga", because I am not sure what xga means. I cannot find it in danuthorincas sample code, and I do not remember seeing this variable as something of meaning in the help files. I remember something of two code lines that went like LINE PRINT, and then DUMP.
|
|
|
Post by tsh73 on Jul 5, 2019 10:48:06 GMT
Help \ Graphics \ Graphics Commands, scroll down to "print":
|
|
|
Post by jarych on Jul 5, 2019 11:00:50 GMT
Excellent. So this is for graphics printing, something I never did much if anything with. This would require much study and thinking.
There is something strange in the helpfile article: Just BASIC has only been through versions 1.0, 1.01, and 2.0. Did the help file really mean to say, "Until version 4.0 of Liberty BASIC, Just BASIC printed the con...." ?
|
|
|
Post by tsh73 on Jul 5, 2019 11:09:43 GMT
JB 2.0 I am using now based off LB 4.3 (I think) JB 1.01 has Microsoft Help, now unsupported. So JB 2.0 Help as HTML pages is adapted from LB - and apparently some things went through.
|
|
|
Post by B+ on Jul 5, 2019 19:51:01 GMT
Thanks, I did not know this option was available.
|
|