Page 14 - DCAP313_LAB_ON_COMPUTER_GRAPHICS
P. 14
Lab on Computer Graphics
Notes provided by graphics programming packages to deal with these basic geometric structures are
called output primitives.
For example:
Drawing a point: SetPixel(100,200,RGB(255,255,0));
Drawing a line: MoveTo(100,100); LineTo(100,200);
Drawing some text: SetText(100,200,”Hello”);
Drawing an ellipse: Ellipse(100,100,200,200);
Painting a picture: BitBlt(100,100,50,50,srcImage,0,0,SRCCOPY);
1.2.6 Properties
• In graphical output primitives, objects are normally connected with properties. E.g.
Point: color
Line: width, style, color
Polygon: edge color, filling color
Text: font size, color, bold or not bold, italic or not, underlined or not, etc.
In graphical packages, we can specify such properties, e.g. In PowerPoint, we can modify the
properties of objects by a format command.
In programming tools, we may pass the properties as arguments when we call the functions of
these primitives, or we may pre-select the properties before calling the functions.
Self Assessment Questions
1. Image …………… is to apply techniques to modify or interpret existing pictures.
(a) applications (b) processing
(c) graphics (d) technology
2. ……………….. are electronic gloves for detecting fingers’ movement.
(a) Scanners (b) Touch panel
(c) Data gloves (d) Mouse
3. ………………… are used to generate drafting layouts and other drawings of normally
larger Sizes.
(a) LaserJet (b) Inkjet
(c) Dot-matrix (d) Pen Plotters
4. ………………. are the final locations on the output devices.
(a) Device coordinates (b) World coordinates
(c) Normalized coordinates (d) Modeling coordinates
5. Modeling coordinates are used to construct individual object shapes.
(a) True (b) False
1.3 The Evolution of Computer Graphics
The evolution of computer graphics is intertwined with textual display, and it is difficult to
consider the two unconnectedly. An old saying has it that a picture is worth a thousand words.
8 LOVELY PROFESSIONAL UNIVERSITY