I have a couple of things to say here, but first: 1. There is not yet an SVGCanvas - the examples contain something called svgWindow, which is just an example of embedding a (static) SVG document on a page.
2. I am about to submit something called SVGCanvas which is an SVG-based, drop-in alternative to GWTCanvas, in order to workaround a limitation in Firefox on Windows (see below). 3. Raphael is an SVG drawing package - I have never used it, but you could look at that too... --- Now, you wanna draw an infinite graphical thingy? We already do that in our Assurity product (www.gbsware.com)...read on.. From my experience, I doubt you want to use SVG in general, except for one special case. The problem with SVG is that the browser support for it is very spotty - especially in IE, before IE9. Some browsers will only support it in XHTTP docs, others can handle it only in an IFRAME or Object or embed, etc. etc. About the only browser which seems to do the right thing is Firefox, although Safari and Opera also come close (in fact Safari/Opera render SVG much faster than FF). Anyway, Canvas 2D is MUCH MUCH more well-supported...except for IE of course. For IE, Pyjamas uses a VML adapter implementation so that GWTCanvas works pretty well on IE, except for Gradient fills (contribution help needed there). For our Assurity product, which has "inifinte" graphic layout on some of the charts, I simply render only the visible graphics, using a 2D Canvas. I just re-render when the viewable portion is resized or scrolled. Sometimes, that is still too large for Firefox on Windows (a bug they so far refuse to address), so for FF I have a tiny override that uses the new SVGCanvas. Rich Newpol On Mon, Feb 27, 2012 at 2:56 PM, Gustaf Nilsson <[email protected]>wrote: > Tjena > > I have never paid any attention to any of these drawing mechanisms but now > i need it for an awesome strategy game idea that struck me last week. Now > server side is shaping up, jsonrpc is set up and what is next to do is draw > my crap on the screen. > > I had a look at the examples and there seems to be svg canvas and gwt > canvas? Whats the difference, pro/cons? (canvas processing example appears > to be kaputt) > > This is what I am looking to do: > > *an (infinite?) map that can be dragged around and zoomed in and out in a > stepless manner. think google maps. > > *double click on the map sets a target for the player > > *vector graphics drawn on the map (bonus if bitmaps can be drawn aswell) > > *antialiased edges on geometry (looks like both svg and gwt does this, so > no problemo?) > > *game graphics can update at the same time as the map is being moved > around/zoomed > > bonus: > *would be ace if it could be made to work on mobile devices. > > thats all! ;) > > any tips n tricks/dos n donts? > > G > > > > -- > ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ >

