Skip to main content

Home/ GWT - Samples/ Contents contributed and discussions participated by Esfand S

Contents contributed and discussions participated by Esfand S

Esfand S

Google Reader (1000+) - 0 views

  • Canvas is a scriptable image. You define its dimensions like a standard img tag, e.g. <canvas id="mycanvas" width="200" height="200"> Sorry, but your browser does not support canvas. </canvas> then draw within that area using a JavaScript API. For example, to draw a blue square which is 180px in dimension at a point 10 pixels down and across: var canvas = document.getElementById("mycanvas"); if (canvas.getContext) { var ctx = mycanvas.getContext("2d"); ctx.fillStyle = "rgb(0,0,255)"; ctx.fillRect(10, 10, 180, 180); } The browser has no access to the resulting shapes once they’ve been drawn. If you wanted to bounce the square around the canvas, you need to repeatedly clear and redraw the shape. However, the current image can be saved using ctx.toDataURL() which returns a PNG-encoded representation.
Esfand S

Raible Designs | JSON Parsing with JavaScript Overlay Types in GWT - 0 views

  • we're using Overlay Types to simplify JSON parsing and make our application lean-and-mean as possible
1 - 20 of 200 Next › Last »
Showing 20 items per page