• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Paths in SVG > Manipulating Paths Using the DOM

Manipulating Paths Using the DOM

In this section, we will create some examples in which we manipulate the DOM to alter the onscreen appearance produced by paths.

Altering the Shape of a Path

In this example, we will alter the shape of a path element that has four corners. When the SVG document loads, it looks like a square with a circle at each corner. If you press the mouse button on one of the circles, you can drag the corner to any point onscreen. Listing 6.13 shows the code.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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