SVG-Whiz!
          
       
      
         Drawing Online Comics in SVG , Part 2
       
      
         The Panel
       
      
         First you take a square, declared as a <rect> with equal sides; the <rect> is a basic shape in SVG  (later I'll show you how to make more complex shapes). The code to create this in SVG  follows the example.
      
      
      
         <svg width='3cm' height='3cm' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg'>
      
         Notice that the file begins and ends with an <svg> tag, just as a Web page has the <html> tag; this is a crucial part of the code...otherwise, the computer won't know what to do with it. Don't worry about the title or description elements for now; they're not strictly necessary. Instead, look at the <rect> tag; this draws the panel, and it's what we're going to be working with. To give it that nice, organic, 21st-Century, Web-savvy feel, let's give it rounded edges (this is a variation on the basic <rect> shape in SVG):
      
      
      
         <svg width='3cm' height='3cm' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'>
      
         This will serve as our panel. Now, we give it an outline, or panel frame (in SVG  parlance, this is a “stroke,” or the line that circumscribes the shape, but we'll call it the frame):
      
      
      
         <svg width='3cm' height='3cm' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'>
      
         Okay, now we're getting somewhere. Kinda funky for a panel, though, right? Let's touch it up a bit, make it a bit less obtrusive...
      
      
      
         <svg width='3cm' height='3cm' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'>
      
         There! That looks like a fairly traditional panel frame, right? So, let's put something in it--a simple object, for now (a <circle>, another SVG  basic shape):
      
      
         <rect ... />
      
      
          
      
         And add a verb...
      
      
      
         <rect ... />35 ' r='5'/>
      
      
         Voila!  You have a comic! Of course, that was not a very interesting one (unless you sense the inherent existential angst of the symbolic pull of gravity, emphasized by the stark black and white palette, and equate it with the human condition... in which case, you are probably far less interesting than that comic, so it must jump up a notch by comparison).
      
      ⓢ