qb45advr.hlp (Topic list)
Selected Graphics Example Programs
  Selected Programs   Graphics Programs   Contents   Index
──────────────────────────────────────────────────────────────────────────────
Graphics Programs
 
The following programming examples create shapes, colors, and patterns
on your screen.
 
Example 1
 
By making either of the CIRCLE statement start or end arguments negative,
you can connect an arc at its beginning or ending point with the center of
a circle. By making both arguments negative, you can draw shapes ranging
from a wedge that resembles a slice of pie, to the pie itself with the
piece missing. This example draws a pie shape with a piece missing.
 
  SCREEN 2
  CONST RADIUS = 150, PI = 3.141592653589#
  StartAngle = 2.5
  EndAngle = PI
  ' Draw the wedge:
  CIRCLE (320, 100), RADIUS, , -StartAngle, -EndAngle
  ' Swap the values for the start and end angles:
  SWAP StartAngle, EndAngle
  ' Move the center 10 pixels down and 70 pixels to the
  ' right, then draw the "pie" with the wedge missing:
  CIRCLE STEP(70, 10), RADIUS, , -StartAngle, -EndAngle
 
Sample output
 
You'll have to run the program to see the output.