Login Register

GFX iPhone support

I'm running the latest iPhone firmware (2.x) which has - as far as I know - full SVG support. But my GFX app behaves very different on the iPhone compared with the desktop Safari (and other browsers). Does GFX have full iPhone support and/or does the iPhone have full SVG support? Here's the app:

http://activityradar.appspot.com

On the desktop, it looks like this:
http://www.evernote.com/pub/focusfriend/focusfriend#2c1f0c2c-45e6-496e-b8dd-c928f242716c

And on the iPhone like this:
http://www.evernote.com/pub/focusfriend/focusfriend#2ca175f2-78d8-490d-8ed9-8fee4ad3efc1

Any clue?

The difference is SVG vs.

The difference is SVG vs. Canvas. For example Canvas does not support any text.

SVG detection is explicitly turned off for iPhone and iPod in dojox/gfx.js. When they will support SVG officially this code will be revised.

So iPhone is forced to Canvas

Ok, when I don't use GFX text on the iPhone, the graphics are shown fine:

http://activityradar.appspot.com/test.html

Why not skip / flush GFX text when in Canvas mode? Or switch to DOM and use this as the text container?

Text shapes should be

Canvas should skip text shapes. If not, it is a bug.

DOM text is undesirable for two reasons:

  • DOM text doesn't support rotations in general. Some browsers support experimental CSS extensions, but so far they have bugs with event processing. The technology is not there yet.
  • DOM text cannot be mixed with the Canvas, which introduces complex rules what goes where ⇒ picture will look different on different renderers, more different than now.

It's .setFont

It's the use of .setFont that makes Canvas throw an error and stop further rendering.

As for DOM, it's used for text in DojoX Charting which works fine on the iPhone!

http://dojocampus.org/explorer/#Dojox_Charting_2D_Updating
http://www.sitepen.com/blog/2007/11/05/dojoxgfx-on-the-iphone/

Well, this is a special

Well, this is a special case: text is not rotated, and in front of all other graphics elements.

Please file a bug about setFont() problem in Canvas renderer.