Q(uick)BASIC Commands: Angle,Color,Scale
Quick View
Angle, Color and Scale-Factor Commands
The commands let you change the appearance of a drawing by rotating it, changing colors, or scaling it
Worth knowing
Useful and cross-version information about the programming environments of QBasic and QuickBasic.
Description/Parameter(s)
Command | Description |
A n | Set angle of rotation n. The value of n may range from 0 to 3, where 0 is 0°, 1 is 90°, 2 is 180°, and 3 is 270°. Figures rotated 90° or 270° are scaled so they appear the same size using 0° or 180° on a monitor screen with a standard screen width-to-height ratio of 4/3. |
TA n | Turn an angle of n degrees; n must be in the range -360 to 360. If n is positive, rotation is counterclockwise; if n is negative, rotation is clockwise. The following example uses TA to draw spokes: |
|
|
C n | Set color to n. See the COLOR, PALETTE, and SCREEN statements for discussions of valid colors, numbers, and attributes. |
S n | Set scale factor n, which may range from 1 to 255. The scale factor multiplied by the distances given with U, D, L, R, or relative M commands gives the actual distance traveled. |
P paintcolor, bordercolor | The paintcolor is the paint color for a figure's interior, while bordercolor is the paint color for the figure's border. Tile painting (painting an area with a graphic pattern) is not supported in DRAW. |
Description/Parameter(s)
Command | Description | Range of values | Comments | |
A n | Set angle rotation | n = 0 to 3, | where | Figures rotated 90° or |
0 is 0°, | 270° are scaled so they | |||
1 is 90°, | appear the same size | |||
2 is 180°, | on a monitor screen | |||
3 is 270°. | with a 4:3 aspect ratio. | |||
TA n | Turn an angle | -360 <= n <= 360 | If n is positive, counterclockwise rotation. | |
S n | Set scale | 1 <= n <= 255 | Set scale factor n, which can range from 0 to 255, inclusive. Increase or decrease length of moves. The default for n is 4, which causes no scaling. The scale factor multiplied by movement- command arguments (divided by 4) gives the actual distance moved. | |
C n | Set color | See the COLOR, PALETTE, and SCREEN statements for discussions of valid color numbers and attributes. | ||
P p,b | p is the paint color for a figure's interior, while b is the paint color for the figure's border. |