opinions on gwt + some vector technology

5 views
Skip to first unread message

AB

unread,
Nov 8, 2007, 11:58:52 PM11/8/07
to Google Web Toolkit
Im sniffing around for gwt enlightened opinions on something.
I have been playing with gwt for a while and am looking at building an
app that needs some vector drawing. We have a badly written svg app
(runs in IE only with adobe plugin) that we have to basically rip up
and rewrite. Here are some thoughts on how to use gwt to do vector
drawing:

A number of people are playing with gwt tied to flash:
http://1pxsolidblack.blogspot.com/2007/10/gwt-flex-and-fabridge.html
However, examples like SWFABridgeWidget would need lots of gwt-java
code to bring some java structure to the framwork.

gwt + svg. gwt-widgets did something like this but abandon it. Maybe
I can revive it although sgv really does seem to be fizzling.

gwt + ???

It seems amazing to me that in 2007, there isnt a uniform way to draw
a GeneralPath into a browser (without an applet)

swoosh

unread,
Nov 9, 2007, 5:48:36 AM11/9/07
to Google Web Toolkit
Hello,

i have similar problem. Im working on timetabling application in GWT
and i need to draw triangle in my schedule in order to indicate that
event helds once in two weeks. I can use regular <div> tag with
triangle image as a background but then I will have to prepare many
background images for different duration (different height) and
different width. I'd rather omit that way and try something better.

I was reading about SVG but then all my application users will have to
install plugin (in IE) or use Firefox. I'm just wondering if there is
any other rational solve of that problem.


Greetings,
Swoosh

AB napisał(a):

Peter Blazejewicz

unread,
Nov 9, 2007, 4:26:42 PM11/9/07
to Google Web Toolkit
hi,

SVG plugin from Adobe was DEPRECATED and it will be no longer updated/
maintained. SO IExpore is no SVG browser really:
see top header on that page:
http://www.adobe.com/svg/viewer/install/main.html

I think we are either have to use Canvas (Safari Win/OSX/ FireFox
natively) or use Flash bridge

> i have similar problem. Im working on timetabling application in GWT
> and i need to draw triangle in my schedule in order to indicate that
> event helds once in two weeks. I can use regular <div> tag with
> triangle image as a background but then I will have to prepare many
> background images for different duration (different height) and
> different width. I'd rather omit that way and try something better.

have you looked into design solution applied e.g. in Google Calendar
or Kiko:
http://www.kiko.com/
that's just pretty well designed timelines which does not require to
use svg/canvas/flash, though they use rectangles everywhere

regards,
Peter

John Gunther

unread,
Nov 9, 2007, 11:39:59 PM11/9/07
to Google Web Toolkit
Swoosh,

If all you have to do is draw a few small triangles you could brute
force it by drawing a 1-unit rectangle at the top,
an 1+x-unit rectangle below that, a 1+2*x-unit rectangle below that,
etc. until the small triangle you desired were drawn.

I've used Image objects (with a single transparent 1x1 pixel
"gchart.gif" they all share) to draw the rectangles in http://gchart.googlecode.com.
Because the image is transparent, you can just set the background
color to any color you want. Some prefer divs but when I tried them I
thought the Image objects (img tag) were a little better/simpler/less
trouble overall (divs were faster and don't require the 1x1 gif, but
Images used less memory and had less "quirks" in IE).

There are more efficient algorithms, see this forum post:

http://groups.google.com/group/Google-Web-Toolkit/msg/3811a94853b7bf20

But if the triangles are small, brute force is probably only a couple
of K per triangle and if you don't need a lot of triangles, then I
wouldn't assume a more efficient approach is really needed.

John

AB

unread,
Nov 11, 2007, 7:04:23 PM11/11/07
to Google Web Toolkit
Here are a few more thought though not necessarily an answer.

This guy has a very nice pure dhtml verctor drawing lib. While he
admits it has performance limitations, he claims it is better than
most that attempt the same thing.
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm

This effort attempt to use an abstraction layer around SVG,Canvas and
so at least, presumably, insulates one from the horrible cross
platform issues. Of course, you still have to "buy in" to svg which
really does seem to be dying
http://ajaxian.com/archives/create-cross-browser-vector-graphics-with-dojo

There are some people playing with gwt wrappers around flash/flex but
they are fairly primitive right now. However, it seems plausable that
gwt could create a complete typesafe wrapper around the flash calls

Toon...@googlemail.com

unread,
Nov 13, 2007, 7:55:53 AM11/13/07
to Google Web Toolkit
I've been using Dojo's GFX from within GWT pretty sucessfully. Dojo
provides a nice API that is implemented in VML (IE), SVG, and
SilverLight.

Best,

-ken

Reply all
Reply to author
Forward
0 new messages