svg rect to path

svg rect to path

by vrluckyin India

HTML

<!-- 
This elephant is a polygon, but to convert the
polygon into a path, we can run the corresponding
javascript then copy the copy the output from our dev tools. Pretty useful!
-->

<svg width="1800" height="900" version="1.1" xmlns="http://www.w3.org/2000/svg">
  <g transform="scale(1)">    
   <path d="M239 0 h 320 v 80 h -320 Z" fill="#fff2cc" stroke="black"></path>
<path d="M239 120 h 320 v 80 h -320 Z" fill="#a9c4eb" stroke="black"></path>
<path d="M239 240 h 320 v 80 h -320 Z" fill="#f8cecc" stroke="black"></path>
<path d="M659 280 h 120 v 320 h -120 Z" fill="#fff2cc" stroke="black" transform="rotate(-23,719,440)"></path>
<path d="M49 290 h 120 v 320 h -120 Z" fill="#99ffff" stroke="black" transform="rotate(19,109,450)"></path>
<path d="M169 480 h 230 v 80 h -230 Z" fill="#a9c4eb" stroke="black"></path>
<path d="M424 480 h 230 v 80 h -230 Z" fill="#a9c4eb" stroke="black"></path>
<path d="M79 680 h 680 v 40 h -680 Z" fill="#cc0066" stroke="black"></path>



  <polygon points="659 280,779,280,779,600,659,600"  />

    
  
  </g>
</svg>

    M659 280 h 120 v 320 h -120 Z