title: Calculate resolution of sprite texture in Pixi.js
body: <p>How can i calculate the resolution of a generated texture in PIXI.js. The documentation of generateTexture(...) requires a number for the resolution.</p>
  
  <p>Doc: <a href="http://pixijs.github.io/docs/PIXI.Graphics.html#generateTexture" rel="nofollow">http://pixijs.github.io/docs/PIXI.Graphics.html#generateTexture</a></p>
  
  <p>In the following example, a rectangle with a specific width and height will be drawn. The resolution would be the number of pixels through the multiplication of width and height in my opinion.</p>
  
  <pre><code>this._graphics.lineStyle(1, 0x012489, 1.0);
  this._graphics.beginFill(0x696969, this.1.0);
  this._graphics.drawRect(-(width/2.0), -(height/2.0), width, height);
  this._graphics.endFill();
  
  this.texture = this._graphics.generateTexture(width * height, PIXI.SCALE_MODES.DEFAULT);
  </code></pre>