Chapter 10 Graphics in QB64 PDF
Chapter 10 Graphics in QB64 PDF
Brain Developers
2. The amount of pixels per unit on the screen is called the _____________.
5. The “H” statement draws a line diagonally in upward direction towards the ______
side.
Answer:
1. In high resolution, the computer screen is divided into 640 × 200 pixels.
2. The amount of pixels per unit on the screen is called the resolution.
5. The “H” statement draws a line diagonally in upward direction towards the left side.
2. In medium resolution mode, the computer screen is divided into 320 × 400 pixels.
(False)
Correct Answer: In medium resolution mode, the computer screen is divided into 320
(horizontal) × 200 (vertical) pixels.
Correct Answer: The PAINT statement is used to fill an object with a colour.
4. To draw vertical lines, y-axis co-ordinates will remain same for both starting and
ending points. (False)
Correct Answer: To draw vertical lines, x-axis co-ordinates will remain same for both
starting and ending points.
1. Kabir wants to draw a box filled with colour using the Line statement, but he is unable
to recollect the keyword for making a filled box. Help him to finish this task.
Answer: He can use BF to draw a box filled with colour using Line statement.
2. The computer teacher has asked Swati to draw vertical lines. Which co-ordinates will
you suggest her to set for both starting and ending points of the line?
1. There are _____ colour options for background and foreground colours.
a) 20
b) 16
c) 15
Answer: b) 16
2. We use ______ statement to draw lines, figures and patterns of different shapes from
any point of the screen.
a) PSET
b) SCREEN
c) LINE
Answer: a) PSET
3. To draw a fill box, the letter __________ is used with line co-ordinates.
a) B
b) BF
c) BC
Answer: b) BF
a) Drawing Boxes
b) Color
c) Screen
Answer: c) Screen
a) Screen 5
b) Screen 2
c) Screen 0
Answer: c) Screen 0
Answer:
F. Answer the following:
Answer: The PSET command stands for Point Set. This command is used to set the pixels at any
specific location on the screen. It allows you to draw figures by changing the value of (x, y)
co-ordinates. Its syntax is: PSET (x,y)
Answer: The Circle statement is used to draw a circle, ellipse or an arc of a circle. We need to
specify the centre location through (x,y) co-ordinates, radius of the circle (r), and colour code (p). Its
syntax is: CIRCLE (x, y), r, p
3. What is the difference between B and BF options used with Line statement?
Answer: B option used with Line statement is used to draw outline of the box, whereas, BF
statement allows us to draw a box filled with desired colour.
Answer: _NEWIMAGE screen statement is used to create a new screen size with higher resolution
using the predefined screen options.
Answer: The PAINT statement is used to fill an object with a colour. It specifies the co-ordinates
from where the figure starts and fills the colour within the enclosed area.
6. How can we draw a rectangle? Explain with an example.
Answer:
We can draw a rectangle in QB64 by using the LINE statement. The following commands create a
rectangle:
SCREEN 7
COLOR 5,15
CLS
LINE(60,60)-(130,100),6,BF