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

The SVG Canvas

An SVG image is two dimensional. That image is drawn on the SVG canvas, which is a two-dimensional plane that is potentially infinite in size. SVG can, in a sense, be considered to be three dimensional in that certain parts of SVG—for example, some of the lighting filter primitives discussed in Chapter 10, “SVG Filters,”—make implicit use of a third dimension. However, an SVG image is rendered only in two dimensions.

You may find it helpful to imagine the SVG canvas as an infinitely large piece of paper (or canvas, if you prefer) onto which SVG “paint” is applied. At any one time, you can see only a finite rectangular part of the canvas. You can think of that rectangular shape—the viewport—as being similar to a rectangular porthole that you look through to see part of the canvas. It is up to you, as the creator of an SVG document, to decide whether your code should relate only to the rectangular viewport that a user will have onto the infinite SVG canvas or whether to code over a much larger area. In the latter case, you will likely expect the user to scroll or pan to a desired part of the image that your code defines.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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