• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The line Element

The line element describes a single straight line. To draw a straight line in a coordinate system, you need to know the coordinates of each end of the line. In SVG, the coordinates of one end of the line are defined by the x1 and y1 attributes. The coordinates of the other end of the line are defined by x2 and y2 attributes.

Listing 3.1 shows four straight lines, each being created using a line element.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint