title: Can GWT use Raphael via JSNI?
body: <p>I need to do some client-side 2D drawing in my GWT app (nothing fancy, just draw a bunch of basic 2D shapes - circles, rectangles, etc.).</p>
  
  <p>I don't believe GWT has a graphics/drawing framework, and so I was wondering if there was any way to use <a href="http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html" rel="nofollow">JSNI</a> to somehow connect to the reputed <a href="http://raphaeljs.com/" rel="nofollow">Raphael</a> JS library and invoke Raphael from inside GWT.</p>
  
  <p>If this isn't possible, can someone explain why and what my options might be?</p>
  
  <p>And if this is possible, then consider the following Raphael code that draws a square:</p>
  
  <pre><code>paper = new Raphael(0,0,500,500);
  var rect = paper.rect(x,y,width,height).attr({"fill":"white","stroke":"red"});
  </code></pre>
  
  <p>I want that JS code above to execute when a user clicks a button. Here is my GWT click handler:</p>
  
  <pre><code>@UiHandler("signInButton")
  void onClickSignInButton(final ClickEvent clickEvent) {
      // ????
  }
  </code></pre>
  
  <p><strong>How do I connect the two?</strong></p>