D
Answer the following questions:
1. Explain any two graphics commands.
2. What is a pixel?
3. What do you understand by resolution?
Define the modes in QBASIC.
5. Define the commands: SCREEN,PSET, LINE, COLOR
Answers
Answer:
1.
clear name
clear nameClears the graphic object
name, which can be X for the X11
window, or an object which has
been created by defgraph_PS or
defgraph_PNG....
color ccc X1 X2 X3
color ccc X1 X2 X3 Defines the color
associated to the color object ccc.
The parameters x1, x2, x3 are the RGB
values (real numbers between 0 and 1).
2.In digital imaging, a pixel, pel, or picture element is a physical point in a raster image, or the smallest addressable element in an all points addressable display device; so it is the smallest controllable element of a picture represented on the screen. The intensity of each pixel is variable.
3.Resolution measures the number of pixels in a digital image or display. It is defined as width by height, or W x H, where W is the number of horizontal pixels and H is the number of vertical pixels.
Once QBASIC program is loaded into the computer memory, it displays Ok prompt. Ok means it ready to accept the commands. QBASIC can be made to translate your instructions in two modes:
• Direct Mode
• Program Mode
1. Direct Mode: The accepts single line instructions from the user and the output is viewed as soon as enter key is pressed. The instructions are not stored in the memory. This mode can be used to do quick calculation. They do not have line numbers.
E.g.
Print 3+4
Print “This is the Direct mode in QBasic”
2. Program Mode: The mode is used to type a program which is stored in the memory. They have line numbers. We have to give the command to get the output.
E.g.
10 Print 3+4
20 End
RUN
5. Sorry I am not sending this one as I am not sure with my answer!
Explanation:
1.the two graphics commands are:
A) CLEAR NAME
B) DEFCOLOR CCC
2:A minute area of illumination on a display screen,one of many from which an image is composed.
or
A PIXEL(SHORT FOR PICTURE ELEMENT) IS A SINGLE POINT IN A PICTURE.ON THE MONITER OF A COMPUTER,A PIXEL IS USUALLY A SQUARE .EVERY PIXEL HAS A COLOR AND ALL THE PIXELS TOGETHER ARE THE PICTURE.
3. RESOLUTION IS THE IMAGE QUALITY PRODUCED BY A PRINTER OR DISPLAYED ON A MONITOR.PRINTERS ALSO HAVE A MEASURE OF RESOLUTION CALLED DPI (DOT PER INCH).
4. QBASIC is an integrated development environment ( IDE) and interpreter for a variety of dialects of BASIC which are based on QuickBASIC. Code entered into IDE is compiled to an intermidiate representation .
5. Screen command:
screen command offers the ability to datach a long running process from a later time.when the session is detached ,the process that was originally started from the screen is still running and managed by the screen.
PSET COMMAND:
It stands for point set .This command is used to set the pixels at any specific location on the screen. It can set the pixels value as per requirement and draw the figure from any point of the screen .
LINE COMMAND:
is a blank line and cursor on the screen,allowing the user to type in instructions for immediate execution.All major operating systems like Windows,Mac,Unix etc .After typing a command,it is executed by pressing the Enter key.
COLOR COMMAND:
It allows the users running MS DOS or the Windows command line to change the background or text.
I hope it can help youu:))