Download ACS Basic Graphics Programming
Transcript
ACS Basic Graphics Programming Manual 26 February 2015 Drawing Arcs How about drawing arcs? You could compute and draw each pixel making up the arc, or have ACS Basic draw it for you if you provide the center, width, height and starting/ending angles. Here is the command format: DRAW.ARC x,y,width,height,start,end,color x center x coordinate (0 – 319) Draws an arc centered at x,y of y center y coordinate (0 – 240) width,height beginning at start width arc width (0 – 319) angle and ending on end angle on height arc height (0 – 240) the current drawing @SURFACE using start starting angle (0 - 359) color end ending angle (0 – 359) color RGB565 box pixels color Here is the program: 10 15 20 25 30 REM draw a red 90 degree arc at the screen center @ANSI.ENABLE=0 DRAW.FILL 0,0,320,240,RGB(0,0,0) DRAW.ARC 160,120,100,100,45,135,RGB(255,0,0) GOTO 30 Copyright©1992-2015 by ACS, Sarasota, Florida 4 ALL RIGHTS RESERVED