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

Chapter 21. SVG and Perl > Generalizing Our Sample File

Generalizing Our Sample File

Now that we have completed our analysis of our sample image, we have more information to use in deciding how to make this document more dynamic. We can randomize many aspects to give each quotation a unique appearance while retaining the overall layout and look of the original design.

The size of the pattern rectangle determines how tightly or how loosely our background pattern repeats. As we saw earlier in the chapter, the tile is based on a hexagon. The hexagon has many characteristics, one being that the proportion of a hexagon's width to its height remains constant. This tells us that if we want to change the size of our tile, we must change both dimensions in proportion to the hexagon. Actually, this quality turns out to be nice because we can define our tile's size using only a single value. In this case, we will use the hexagon's height and then, through a little geometry and trigonometry, we will calculate the tile's width.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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