title: How can I simulate z-index in canvas
body: <p>I have asked a question before: <a href="https://stackoverflow.com/questions/14250697/how-can-i-control-z-index-of-canvas-objects">How can I control z-index of canvas objects?</a> and we reached to a solution that may not be a good one for complicated situations.</p>
  
  <p>I found that canvas doesn't have a z-index system, but a simple ordered drawing one. Now there is a new question: how can I simulate z-index system to make this problem fixed in complicated situations?</p>
  
  <p>The good answer can solve a big problem.</p>