Computer Graphics Questions & Answers – Line Attributes

This section of our 1000+ Computer Graphics multiple choice questions focuses on Line Attributes.

1. The basic attributes of a straight line segment are
a) Type
b) Width
c) Color
d) All of these
View Answer

Answer: d
Explanation: Type, width and colors are the basic attributes of line.

2. A dashed line could be displayed by generating_________.
a) Inter dash spacing
b) Very short dashes
c) Botha a and b
d) A or B
View Answer

Answer: a
Explanation: The inter dash spacing that is equal to the length of the solid sections displays dashed line.

3. A dotted line can be displayed by generating
a) Very short dashes with spacing equal to and greater than dash size
b) Very long dashes with spacing equal to or greater than dash size
c) Very short dashes with spacing equal to and greater than dash size
d) Dots
View Answer

Answer: c
Explanation: Very long dashes with spacing equal to or greater than dash size can displays dotted line.

4. Which of the following is not a line-type?
a) Dashed line
b) Dark line
c) Dotted line
d) Only b
View Answer

Answer: d
Explanation: Except dark line those are the types of the line.
advertisement
advertisement

5. In an application program, to set line-type attributes the following statement is used.
a) SetLinetype(lt)
b) setLinetype(lt)
c) SETLINETYPE(lt)
d) SETLINE()
View Answer

Answer: b
Explanation: None.

6. The algorithm which displays line-type attributes by plotting pixel spans is
a) Raster line algorithm
b) Raster scan algorithm
c) Random line algorithm
d) Random scan algorithm
View Answer

Answer: a
Explanation: Raster line algorithm displays line-type attributes.
Note: Join free Sanfoundry classes at Telegram or Youtube

7. Pixel mask means
a) A string containing only 1;s
b) A string containing only 0’s
c) A string containing 1 and 0
d) A string containing 0 and 0
View Answer

Answer: c
Explanation: Inter span spacing can be specified in a pixel mask that contains digits 1 and 0.

8. A heavy line on a video monitor could be displayed as
a) Adjacent perpendicular lines
b) Adjacent parallel lines
c) Both a and b
d) Neither a nor b
View Answer

Answer: b
Explanation: A heavy line displayed as adjacent parallel lines, while pen plotter might require pen changes.

advertisement

9. To set the line-width attribute the following command is used.
a) SETLINEWIDTHSCALEFACTOR (lw)
b) Setlinewidth()
c) Setlinewidthscalefacto (lw)
d) setLineWidthScaleFactor (lw)
View Answer

Answer: d
Explanation: setLineWidthScaleFactor (lw) function can be used to set line-width attribute.

10. The parameter to “setLineWidthScaleFactor (lw) “function specifies?
a) Standard width
b) Relative width of the line
c) Thickness of the line
d) All of the mentioned
View Answer

Answer: b
Explanation: The positive value to lw indicates the relative width of the line.
Standard width, if Value=1
Thickness, if value>1.
advertisement

11. We can adjust the shape of the line ends to give them a better appearance by using
a) Line spacing
b) More dots
c) Line caps
d) Round cap
View Answer

Answer: c
Explanation: Line caps are obtained by adjusting the end points of the line.

12. Thick line drawn with
a) Butt caps
b) Round caps
c) Projecting square caps
d) All of the mentioned
View Answer

Answer: d
Explanation: None.

13. We set the line-color value in PHIGS with the function
a) setPolylineColorIndex (lc)
b) setline Color()
c) SETPOLYLINECOLORINDEX (lc)
d) Only b
View Answer

Answer: a
Explanation: The setPolylineColorIndex (lc) function is used to set the line color.

14. If the angle between 2 connected line segments is very small then ________ can generate a long spike that distorts the appearance of the polyline.
a) Miter join
b) Round join
c) Bevel join
d) None of the mentioned
View Answer

Answer: a
Explanation: Miter join provides long spikes that distort the appearance of the polyline.

15. A line drawn in the background color is
a) Visible
b) Invisible
c) Visible or Invisible
d) Only b
View Answer

Answer: d
Explanation: A line drawn in the background color is always invisible because both are same color.

Sanfoundry Global Education & Learning Series – Computer Graphics.

To practice all areas of Computer Graphics, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.