You are on page 1of 6

Attributes of 'LINE'

• Line has 3 basic attributes:


1. Line width
2. Line color
3. Line type
Line width:
• The line width depends on capability of the device to
display it.
• In raster scan display the standard width line (or
default line) is drawn with one pixel at each sample
position.
• To draw thicker line another parallel line is drawn
adjacent to the first one.
• The command to set line width is:
SetLinewidthScaleFactor(lw)
Line color
• When we draw a line the default color of the line is
displayed like for example the color of line drawn in
Microsoft paint is black.
• The number of color choices depends on the number of
bits available per pixel in the frame buffer.
• Then you can choose the color according to your own
choice by setting the value of the color with the command
in PHIGS : SetPolylineColorlndex (lc).
• In Microsoft Paint we are given a drop down area to choose
from different color options.
Line types:
• There are 3 types of lines:
1. Solid Line
2. Dashed Line
3. Dotted Line
Solid line is the default line which is drawn with complete
solid section for the length specified.
• To set line type attributes in a PHIGS application the
command is
setLinetype (It)
Dashed Line
• To draw dashed line we generate an inter-dash
spacing that is equal to the length of the solid
sections.
• So basically we specify the full length of the line
and then length of the dashed solid section and
the length of the spacing which is usually in the
color of background.
• This forms dashed line.
Dotted line
• To draw a dotted line very short dashes are
drawn.
• In this dotted line the spacing between the
dots(small dashes) can be equal to or greater
than the dash size.

You might also like