Computer Science, asked by palak101318, 2 months ago

Write a program to draw the following figure on the screen( qb64)
inappropriate answer would be reported

Attachments:

Answers

Answered by sonamsharmanamo
1

Answer:

The drawString$ can be DRAW instructions in quotation marks or a STRING variable using DRAW instructions.

DRAW starting coordinates can be set using PSET, PRESET, CIRCLE or LINE ending positions.

Other graphic objects can be located at or relative to the last DRAW position using STEP.

DRAW can inherit colors from other graphic statements such as PSET, LINE and CIRCLE.

Draw strings use letters followed by the number of pixels to move, an angle, coordinate or a color value.

Draw strings are flexible with spacing. Spacing is not required. DRAW will look for a number value after a valid letter.

DRAW statements are not case sensitive.

"B" (blind) before a line move designates that the line move will be hidden. Use to offset from a "P" or PAINT border.

"C n" designates the color attribute or _RGB string numerical color value to be used in the draw statement immediately after.

"M x, y" can move to another coordinate area of the screen. When a + or - sign is used before a coordinate, it is a relative coordinate move similar to using the STEP graphics keyword. DRAW "M+=" + VARPTR$(variable%)

"N" before a line move designates that the graphic cursor will return to the starting position after the line is drawn.

"P f [, b]" is used to paint enclosed objects. f denotes the fill color and b the border color, if needed.

"S n" changes the pixel move size of the lines. Default is 4 (1 pixel) minimum. "S8" would double the pixel line moves.

"X" + VARPTR$(value) can draw another substring.

Certain letter designations create line moves on the SCREEN. Each move is followed by the number of pixels:

"D n" draws a line vertically DOWN n pixels.

"E n" draws a diagonal / line going UP and RIGHT n pixels each direction.

"F n" draws a diagonal \ line going DOWN and RIGHT n pixels each direction.

"G n" draws a diagonal / LINE going DOWN and LEFT n pixels each direction.

"H n" draws a diagonal \ LINE going UP and LEFT n pixels each direction.

"L n" draws a line horizontally LEFT n pixels.

"R n" draws a line horizontally RIGHT n pixels.

"U n" draws a line vertically UP n pixels.

Angles are used to rotate all subsequent draw moves.

"A n" can use values of 1 to 3 to rotate up to 3 90 degree(270) angles.

TA n" can use any n angle from -360 to 0 to 360 to rotate a DRAW (Turn Angle). "TA0" resets to normal.

When VARPTR$ is used, DRAW functions such as TA angles use an equal sign: "TA=" + VARPTR$(angle%)

The graphic cursor is set to the center of the program window on program start for STEP relative coordinates.

DRAW can be used in any graphic screen mode, but cannot be used in the default screen mode 0 as it is text only.

Similar questions