09-07-2013, 04:30 PM
WRITING A GRAPHICS EDITOR
AIM:
1. Text and Graphics mode, initialization of graphics mode, graphics drivers, switching between text and graphics mode, error handling
2. Color, Color Palette, Aspect ratio, Text: fonts, alignment, size, orientation and justification.
3. Graphics Primitives: Pixel, Line, Circle, Ellipse, Polygons, Line styles, Bar graphs, Pie Charts, Histograms, filling a polygon, windowing.
OBJECTIVE:
Assignments to understand functions available in graphics library
THEORY:
Components of VDU are:
1. Video Screen
2. Video Card / Video Display Adapter a h/w present on motherboard
Adapter is an agent between microprocessor and screen. As microprocessor can not send signals which are required for drawing images on screen adapter has :-
1. VDU memory
2. Circuitry which transfers the contents of the VDU?
The microprocessor writes the information to be displayed on to the screen into VDU memory, whereas display adapter circuitry transfers this information from VDU mem to the screen.
Display Adapters
A no. of display adapters are available with varying capabilities
• Monochrome Adapters (MA)
• Color Graphics Adapter (CGA)
• Enhanced Color graphics adapter (EGA)
• Multicolor color graphics adapter (MCGA)
• Video graphics array(VGA)
• Super Video graphics array(SVGA)
• Extended graphics adapter (XGA)
These adapters can be programmed into 2 modes – Text and Graphics (except MA). In text mode we can display text and in graphics mode we can display graphics.
Monitors (Display Screens )
Major categories are:-
• Monochrome monitors
• Composite monochrome monitors
• Composite color monitors
• TV sets
• RGB monitors
• VGA mono monitors
• VGA color monitors
Video Display Modes
Each mode requires certain h/w (monitor and display adapter) and programming approach.
All modes are basically two types – Text and Graphics
Resolution
The smallest addressable unit of the screen is called as pixel. The resolution for the screen means no. of pixels for the screen, higher resolution means a sharper and cleaner picture with less stair step appearance.
Text or Graphics
The amount of memory required to represent a character on the screen in text and in graphics mode varies form mode to mode.
Colors in graphics mode
The no. of colors that each adapter can support and the way each adapter generates those colors is drastically different. Sets of colors are called pallets. The provision of pallets is made to keep memory requirement minimum while making availability of max colors.
Graphics Library When we start drawing any graphics on the screen we need header file called as graphics.h and a library file called graphics.lib.
The header file contains definition and explanation of all the functions and graphics functions are kept in library file.