KEMBAR78
Attributes of output primitive(line attributes) | PPTX
Line Attributes
•Line type
•Line width
•Pen and Brush Options
•Line Color
LINE ATTRIBUTES
 Basic attributes of a straight line segment are its type,
its width and its color.
 In some graphics packages, lines can also be displayed
using selected pen or brush options.
Line Type:
Line-type attribute include solid lines, dashed lines ,
and dotted lines.
 To set line type attributes in a PHIGS application program ,
a user involves the function
setLinetype( lt)
where parameter lt is assigned a positive integer value.
Line width:
A line-width options depends on the capabilities of
the output device. A heavy line on a video monitor could be
displayed as adjacent parallel lines, while a pen plotter
might require pen changes.
We set the line-width attribute with the command:
setLinewidthscaleFactor (l w)
 There are three differents line cap they are
 Butt cap
 Round cap
 Projecting square cap
Butt cap:
One kind of line cap is the butt cap obtained by adjusting
the end positions of the component parallel lines so that the thick
line is displayed with the square end of the thick line has slope -
1/m.
Round cap:
Another line cap is the round cap obtained by adding a
filled semicircle to each butt cap. The circular are centered on the
line endpoints and have a diameter equal to the line thickness.
Projecting square cap:
Extend the line and add buttcap.
 Displaying thick lines using horizontal and vertical
pixel spans.
 Three possible methods for smoothly joining two line
segments.
 A miter join is accomplished by extending the outer
boundaries of each of the two lines until meet.
 A round join is produced by capping the connection
between the two segment with a circular boundary
whose diameter is equal to the line width.
 Diameter = line width
 A bevel join is generated by displaying the line with
butt caps and filling in the triangular gap where the
segments meet. If the angles between two connected
line segments is very small.
Pen and Brush
 Lines can be displayed with pen or brush selections.
 Options in the category include shape, size, an
patterns.
 Some possible pen or brush shapes
Line Color
 When system provides color(or intensity) options, a
parameter giving the current color index is included in
the list of system- attribute values.
 A polyline routine display a line in the current color by
setting this color value in the frame buffer at pixel
loctaions along the line path using the setpixel
procedure.
 We set the line color value in PHIGS with the function
setPolylineColourIndex(lc)

Attributes of output primitive(line attributes)

  • 1.
    Line Attributes •Line type •Linewidth •Pen and Brush Options •Line Color
  • 2.
    LINE ATTRIBUTES  Basicattributes of a straight line segment are its type, its width and its color.  In some graphics packages, lines can also be displayed using selected pen or brush options. Line Type: Line-type attribute include solid lines, dashed lines , and dotted lines.
  • 4.
     To setline type attributes in a PHIGS application program , a user involves the function setLinetype( lt) where parameter lt is assigned a positive integer value. Line width: A line-width options depends on the capabilities of the output device. A heavy line on a video monitor could be displayed as adjacent parallel lines, while a pen plotter might require pen changes. We set the line-width attribute with the command: setLinewidthscaleFactor (l w)
  • 5.
     There arethree differents line cap they are  Butt cap  Round cap  Projecting square cap Butt cap: One kind of line cap is the butt cap obtained by adjusting the end positions of the component parallel lines so that the thick line is displayed with the square end of the thick line has slope - 1/m. Round cap: Another line cap is the round cap obtained by adding a filled semicircle to each butt cap. The circular are centered on the line endpoints and have a diameter equal to the line thickness. Projecting square cap: Extend the line and add buttcap.
  • 7.
     Displaying thicklines using horizontal and vertical pixel spans.  Three possible methods for smoothly joining two line segments.  A miter join is accomplished by extending the outer boundaries of each of the two lines until meet.  A round join is produced by capping the connection between the two segment with a circular boundary whose diameter is equal to the line width.  Diameter = line width
  • 8.
     A beveljoin is generated by displaying the line with butt caps and filling in the triangular gap where the segments meet. If the angles between two connected line segments is very small.
  • 9.
    Pen and Brush Lines can be displayed with pen or brush selections.  Options in the category include shape, size, an patterns.  Some possible pen or brush shapes
  • 12.
    Line Color  Whensystem provides color(or intensity) options, a parameter giving the current color index is included in the list of system- attribute values.  A polyline routine display a line in the current color by setting this color value in the frame buffer at pixel loctaions along the line path using the setpixel procedure.  We set the line color value in PHIGS with the function setPolylineColourIndex(lc)