[svg-developers] Re: Accessing Paths based on bounds.

2013-03-31 Thread HelderMagalhaes
 Hello all,

Hi wrinkledcheese,


 I want to access all paths that fall within a certain bounds.

Checkout methods such as getIntersectionList and getEnclosureList (and/or 
their boolean counterparts, checkIntersection and checkEnclosure) [1]. I 
believe they offer exactly what you're looking for... ;-)


 I'm hoping there is something in jQuery or D3 that can help me [...]

These are native methods which should already be in most SVG implementations, 
so no need for add-ons. Note that, nevertheless, you should test them in your 
target environments, as implementations such as WebKit (Safari/Chrome/etc.) and 
Gecko (Firefox) have only added support for this about 1-2 years ago (so very 
outdated versions don't have these methods available).


Hope this helps,
 Helder


[1] 
http://www.w3.org/TR/SVG/struct.html#__svg__SVGSVGElement__getIntersectionList





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] Re: Accessing Paths based on bounds.

2013-03-31 Thread HelderMagalhaes
Follow-up on my previous post...

 These are native methods which should already be in most SVG implementations 
 [...] and Gecko (Firefox) have only added support for this about 1-2 years 
 ago [...]

Unfortunately, I thought this had landed already but it's not the case, so it's 
still not available in Firefox. :-(

You can follow progress and/or vote on bug 501421 [1].

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=501421





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] Re: toggle href onmousover onmouseout

2013-03-29 Thread HelderMagalhaes
 Dear list,

Hi svgquestion,


 I have a very simple problem. I just would like to toggle the href attribute 
 on a use element with onmouseover and onmouseout events. It works in Firefox. 
 But It does not work in Chrome and IE9 ?

It's not *that* simple, it's even a somehow tricky situation as you are 
toggling the use target in runtime and the toggling itself is made between 
symbol elements...

That said, I've started instrumenting the code to try understand what was 
happening. Apparently both IE9 and Chrome are behaving as if the element is 
reset whenever replaced, including an event context loss, which causes a link 
replacement for each mouse event; the mouse out is never triggered due to that 
constant replacement (together with a performance hit as well - imagine a 
complex symbol being replaced dozens of times per second).

I've slightly adapted the code to avoid the replace-per-mouse-event symptom, by 
adding a check, and left the debug code in case anyone wants to take a look at 
what's happening. The modified functions follow:

function rec1(evt) {
  var element = evt.currentTarget;
  element.setAttributeNS(xlinkNS,href,#symbolRect1);
  // allow seeing what's happening
  console.log(element.getAttributeNS(xlinkNS,href));
}

function rec2(evt) {
  var element = evt.currentTarget;
  // avoid replacing the symbol for each mouse event
  // (behavior seen in IE9 and Chrome/Safari)
  if(element.getAttributeNS(xlinkNS,href) != #symbolRect2){
element.setAttributeNS(xlinkNS,href,#symbolRect2);
  }
  // allow seeing what's happening
  console.log(element.getAttributeNS(xlinkNS,href));
}


I'm not sure if this behavior might be underspecified in the SVG specification; 
at least for now, I'm leaving that part investigation for the experts. ;-)


 Thank you for your help

Hope this helps,
 Helder





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] Re: Computing the convex hull of a set of points

2012-08-25 Thread HelderMagalhaes
Hi everyone,


--- In svg-developers@yahoogroups.com, Cameron McCormack cam@... wrote:
 Today I had to write some code to determine the convex hull of a set of
 points (and then inflate that polygon by a small amount) for my project.

Just stumbled upon an alternative proposal for doing just that, both in 2D and 
3D. According to the author, it seems quite fast when compared to other 
algorithms, so here it is:

http://mindthenerd.blogspot.co.uk/2012/05/fastest-convex-hull-algorithm-ever.html


Cheers,
 Helder





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] SVG icons (and invitation to share other SVG-related raster art)

2011-02-10 Thread HelderMagalhaes
Hi everyone,

Perhaps a bit ironic... I've created a couple icons a few years ago, based in 
the logo contest winner ran back then.

Recently, I found the files rotting in my hard drive and decided to publish 
them [1]. :-)

Share your pixel-based SVG-related material as well! ;-)

Cheers,
 Helder

[1] http://heldermagalhaes.com/stuff/svg/icons/





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] Re: SVG Open

2010-09-04 Thread heldermagalhaes
Hi everyone,


I'd also take the opportunity to thank the organizing committee [1], with a 
special mention for Cyril and Andreas, and all supporting staff for making such 
a pleasant conference possible. You guys really made it worth it! :-)


 I think that the host, Paris Telecom (who did an extraordinary
 job by the way) and their associates will be posting audio,
 video and links sometime soon.

Yeah, I also hope to see the videos and also the other multimedia material 
(photographers were pretty active) made available soon. ;-)


Cheers,
 Helder


[1] http://svgopen.org/2010/about_svgopen.shtml





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] Re: [ANN]VTD-XML 2.9

2010-08-17 Thread heldermagalhaes
Hi Jimmy,


 VTD-XML 2.9, the next generation XML Processing API for SOA and Cloud 
 computing, has been released.

Thanks for the update. Nevertheless, please create a new thread [1] instead of 
replying to an existing post [2]: this will give more visibility to the (newly 
created) thread and reduce the noise at the same time (completely different 
matters in same threads is weird, simply changing the message subject is 
insufficient). ;-)


Cheers,
 Helder


[1] http://tech.groups.yahoo.com/group/svg-developers/post
[2] http://tech.groups.yahoo.com/group/svg-developers/message/63966





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] Determining viewport size

2010-08-10 Thread heldermagalhaes
Hi everyone,


It seems a simple question, although I'm not being able to find an easy answer: 
how can one determine the actual (screen) viewport size?

I remember using innerWidth/innerHeight in the past (window object properties) 
but AFAIK these are not standard: at least, Window size and position 
information isn't addressed in the current Window Object specification [1]. 
Also, for example, these properties aren't supported by Batik [2] and probably 
other pure SVG implementations. Nevertheless, they seem to be supported by 
every Web browser that I'm aware of, so could this be seen as a Batik et. al. 
limitation? (That is, could one expect the properties to be made standard in a 
short-to-medium term?)

One could also try getting limit coordinates (using a combination of the 
width/height/viewBox properties) and later do some maths to transform 
them to screen coordinates but intuitively this will fail unless 
preserveAspectRatio [3] is set to none (which would force the whole viewbox 
to be used but isn't often used as the graphics will appear stretched).

Please shed some light into this matter and/or point me in the right direction: 
maybe I'm just missing something... ;-)


Cheers,
 Helder


[1] http://www.w3.org/TR/Window/
[2] http://xmlgraphics.apache.org/batik/status.html#ecmascript
[3] http://www.w3.org/TR/SVG11/coords.html#PreserveAspectRatioAttribute





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] Re: embedded svg shows different in every browser

2008-01-24 Thread heldermagalhaes
--- In svg-developers@yahoogroups.com, Hago Ziegler [EMAIL PROTECTED] wrote:
 I just had to remove the size definitions - width and height - and
 leave just the viewBox in the same size.

Simply removing size definitions seems a bit risky as I'm not sure if
this is the default behavior defined in the specification.

I suggest setting in the top level svg element:

width=100% height=100% preserveAspectRatio=xMidYMid meet

This will resize the SVG to whatever the object/embed size is. To use
the whole visible area, simply set the width/height to 100% in the
object/embed too. Also, this approach is SVG 1.2 compliant (where
percent units are accepted only in the top level svg element).

Regards,

  Helder Magalhães



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[svg-developers] Re: SVG in Safari 1 and 2

2007-07-30 Thread heldermagalhaes
 I have no idea what kind of SVG support it (Safari 3.0) has.

SVG support in version 3 of Safari seems to be fairly consistent! :-)
Few memory leaks observed (which lack a deeper study before trying to
post any bug reports), but in terms of support it seems to tackle with
Firefox (http://www.codedread.com/svg-support.php).

 I have not heard much good about the Windows version of Safari.

I believe this hassle was caused by a few security issues and serious
bugs in first public beta. Now all seems pretty solid, both regarding
general and SVG usage.

Regards,

  Helder Magalhães



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[svg-developers] Re: JPG to SVG

2007-07-16 Thread heldermagalhaes
 I want to convert an image in JPEG format to SVG.
 How can I do it using Batik?

I'm not sure if Batik is able to do this. Batik is an excellent
framework for SVG development, but I believe it has no built-in
support for image rasterization.

For this I suggest playing with Inkscape (http://www.inkscape.org/),
which has integrated potrace (http://potrace.sourceforge.net/). One
can, for example, play with the settings and, once the results are
satisfying, build a command-line script which automates the conversion
of several images.

There are few other tools which are suggested in Inkscape's Wiki
(http://wiki.inkscape.org/wiki/index.php/Tools#Vectorize.2Ftrace).

 another thing is after I convert the image from SVG to JPG
 its height and width is fixed. If I change that a white border 
 is added but the picture remains same. This is a problem.
 How can I do that?

Probably this (the white border issue) has to do with the configured
view port - take a look at the viewbox attribute
(http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute).

On the other hand, I've never converted SVG to images so I'm not aware
of the settings for the image size output - apparently this is
configurable in the rasterizer options
(http://xmlgraphics.apache.org/batik/tools/rasterizer.html#using)
which seems far better than changing the source SVG.

 please give me some suggestions
 Thanks in advance
 
 Regards
 Arafat

Hope this helps.

Regards,

  Helder Magalhães



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[svg-developers] Re: why Renesis is developing SVG plugin?

2007-07-09 Thread heldermagalhaes

Dear Sanyaade,

 Adobe will open source its SVG plugin, so it is not going to be
dead. This was already done as part of ActionScript.
(took the freedom of making small corrections to make the text more clear)

Do you have any proofs of this? I never saw nothing stating that Adobe
would release any of ASV's source code, though I've seen exactly the
opposite (page 3 of http://www.adobe.com/svg/pdfs/ASV_EOL_FAQ.pdf). If
there's any additional information you'd like to share, please post.

Note that Adobe's intention to open source ActionScript was most
probably caused by problems with previous implementations, failing
standards compliance, reliability, etc. which Adobe alone was failing
to fix for a few years already (Flash technology always suffered from
quicks and struggling with these). Also, I guess Adobe also wanted to
establish a bridge with the (Open Source) community - Adobe's attitude
(previously) was very closed, which seems to be changing but
sincerely, now that Adobe bought Macromedia, is trying to push Flash
technology even harder and (unfortunately or not) I don't believe
Adobe will even open source its SVG implementation. :-|

I believe Emia Systems deserves great support by the SVG community for
their effort in developing Renesis. I believe the company should clear
its licensing policy regarding their SVG implementation, to make sure
we all aren't investing in a future EOL part II (there's already a
related post at EmiaSys.NET site at
http://www.emiasys.net/index.php?option=com_joomlaboardItemid=2func=viewid=157catid=2),
but I'm pretty sure it's a minor detail! ;-)

Best regards,

  Helder Magalhães



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[svg-developers] Re: batik: disable text selection

2007-06-01 Thread heldermagalhaes
 Is there a way to disable text selection?
 - I want to use events, so 'pointer-events' cannot set to none
 - I need the default mouse cursor over text elements

Yes, probably there are more than one way to accomplish this. For
example, I made a sample (available below) where text selection is
disabled by overlaying text elements with invisible rectangles, which
catch the pointer events and therefore disable the feature, while
allowing the events to propagate to the SVG document root (uncomment
the 'alert' to verify).

Nevertheless I guess you should ask yourself if you really want to do
that: text selection is seen as a good thing, although I admit text
selection is currently faulty in most implementations, mixing up
pointer events, catching events when not expected, etc.. I think
disabling the feature can be a smart way to temporarily overcome these
limitations while implementations don't catch up with developer/user
needs.

References:
  http://www.w3.org/TR/SVG11/text.html#TextSelection
(although it's referred that «A text selection operation starts
[...] no links or events have been assigned to the 'text' [element]»,
any of the tested implementations seem to respect this)

  http://osdir.com/ml/web.svg/2004-11/msg00053.html
(somehow old as the SVG 1.2 specification was redesigned and the
link referred doesn't work, but the concept is there and will probably
be in the standard some day)

I provide a sample test describing the proposed behavior. Note that it
works in Batik 100% but the dynamic text bounding box is unstable in
ASV6 beta 1 (sometimes shows it, sometimes not - weirdly - that's why
I didn't made the rectangle completely invisible in this case). Also,
Renesis (and other SVG implementations) don't implement the bounding
box feature (and it crashes eSVG) so use with care.

If using the Yahoo! Groups Web interface to view this, it shows much
better if fixed width font is used (right menu Show Message Option,
 Use Variable Width Font):

?xml version=1.0 encoding=UTF-8 standalone=no?
svg xmlns:xlink=http://www.w3.org/1999/xlink;
xmlns=http://www.w3.org/2000/svg;
  contentScriptType=text/ecmascript contentStyleType=text/css
  version=1.2 baseProfile=tiny
  width=800 height=600 viewBox=0 0 800 600
preserveAspectRatio=xMidYMid meet
  onload=init(evt) onmouseup=handler(evt)

  titleText selection test/title

  script type=text/ecmascript ![CDATA[
var svgNS = http://www.w3.org/2000/svg;;

var init = function(evt){
  //fetch the text element
  var textEle = document.getElementById(dynamic-text);

  //compute its bouding box
  var theBB = textEle.getBBox();
  
  //create an invisible rectangle
  var bbox = document.createElementNS(svgNS, rect);
  bbox.setAttributeNS(null, x, theBB.x);
  bbox.setAttributeNS(null, y, theBB.y);
  bbox.setAttributeNS(null, width, theBB.width);
  bbox.setAttributeNS(null, height, theBB.height);
  bbox.setAttributeNS(null, fill, black);
  bbox.setAttributeNS(null, fill-opacity, 0.1);
  bbox.setAttributeNS(null, stroke, none);
  bbox.setAttributeNS(null, stroke-width, 0);
  
  //insert into the document
  document.documentElement.appendChild(bbox);
}

var handler = function(evt){
  //uncomment to verify event propagation
  //alert(mouseup);
}

var nullHandler = function(evt){
}
  ]] /script

  text x=50 y=100 font-size=50usual text pointer/text
  text x=50 y=200 font-size=50 style=cursor:defaultdefault
pointer/text

  !-- standard way to do it (although apparently I doesn't work) --
  text x=50 y=300 font-size=50
onclick=nullHandler(evt)standard unselectable text/text

  text x=50 y=400 font-size=50static unselectable text/text
  !-- an invisible rectangle covers text, disabling selection --
  rect x=50 y=350 width=550 height=50
fill=white fill-opacity=0 stroke=none stroke-width=0 /

  text x=50 y=500 font-size=50 id=dynamic-textdynamic
unselectable text/text

/svg




-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[svg-developers] Re: Detecting when rendering is complete

2007-05-30 Thread heldermagalhaes
 Is there some way to tell when a complex page has actually finished
drawing?
 I am trying to do some timing to see how much time various things
take in the SVG DOM. If I add, for example, 3000 text nodes
 using code like:
 
 try{suspendHandle = Root.suspendRedraw(1);}
  catch(e){}
  D0=(new Date()).valueOf()
  for (i=0;i3000;i++)addNode(text)
  try{Root.unsuspendRedraw(suspendHandle);}
  catch(e){}
  D1=new Date().valueOf()
 display(D1)

To my knowledge, I'm not sure if this can ever be accomplished. Mixing
DOM element creation and events can introduce even more noise to this
kind of profiling.

Although the suspendRedraw/unsuspendRedraw were somehow useful for
many heavy operations, they don't seem to be properly implemented
around...

Anyway, I made a test file which can be of any use. I tested with
several SVG implementations (Firefox 2.0.3 and 3.0 alpha4, Opera 9.21,
Batik 1.7 beta1, IE7+ASV 6.0 beta, Renesis 0.7 and eSVG 2.4) and
obtained results vary a lot. A few thoughts on results:

-- Firefox 2 seems to be the simplest to understand (timings reveal
rendered occurs when expected);
-- Firefox 3 timings are completely reversed compared to Firefox 2
(DOM and/or rendering engine logics were probably redesigned);
-- Opera seems to make assumptions while the DOM is changed (total
time is spread over the three steps);
-- ASV doesn't properly handle the event queue timer so the rendering
time can't be (apparently) well measured (don't forget to edit the
script or else nothing will happen);
-- Batik seems to make some rendering assumptions during node creation
(measured time was about the same while in DOM operations and rendering);
-- Both Renesis and eSVG crash!

Few relevant notes are included in my test file (script comments and
document description). Sorry for the copy+paste mess up but I'm not
able to attach files:

?xml version=1.0 encoding=UTF-8 standalone=no?
svg xmlns:xlink=http://www.w3.org/1999/xlink;
xmlns=http://www.w3.org/2000/svg;
  contentScriptType=text/ecmascript contentStyleType=text/css
  version=1.2 baseProfile=tiny
  width=800 height=600 viewBox=0 0 800 600
preserveAspectRatio=xMidYMid meet
  onload=init(evt)

  titleRendering speed/title
  desc
This is a performance test to measure how much time does a
rendering take.
Note that this test doesn't evaluate DOM performance only but also
ECMAScript binding.
Also note that rendering speed can be affected by many things:
  -- In this case, you had to specify well defined text properties
to make sure one
implemetations don't, for example, simply assume default text
without stroke...
  (which is pretty expensive from a rendering point of view).
  -- Using random text placing can lead to varying results
  (free portions of the screen can be - are really? -
optimized by the renderer)
References:
 
http://dev.opera.com/articles/view/timing-and-synchronization-in-javascript/
  /desc

  script type=text/ecmascript ![CDATA[
var start = new Date();
var initFired, renderingFinished;
var svgNS = http://www.w3.org/2000/svg;;

var timesRepeated = 3000;
var textContents = text;

for (i = 0; i  timesRepeated; i++){
  var textElement = document.createElementNS(svgNS, text);
  var textNode = document.createTextNode(textContents);
  textElement.appendChild(textNode);

  //set some properties to make it visible
  //(or else the rendering engine may remove the elements from the
scene, showing false results)
  textElement.setAttributeNS(null, x, (Math.random() * 800));
  textElement.setAttributeNS(null, y, (Math.random() * 600));
  
  document.documentElement.appendChild(textElement);
}

var endScript = new Date();

var result = function(){
  renderingFinished = new Date();
  alert(
Time spent...\n\t +
scripting:  + (endScript.getTime() - start.getTime()) + 
ms\n\t +
initializing:  + (initFired.getTime() - endScript.getTime())
+  ms\n\t +
rendering:  + (renderingFinished.getTime() -
initFired.getTime()) +  ms
  );
}

var init = function(evt) {
  initFired = new Date();

  //place in event queue
  //(immediately called after rendering)
  //setTimeout(result(), 0);//ASV needs a string - nevertheless,
it doesn't fire the event immediately after rendering
  setTimeout(result, 0);
}

  ]] /script
/svg




-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this 

[svg-developers] Re: How to text write a path

2007-05-30 Thread heldermagalhaes
 path=M0,275L30,0
 
 Can anyone break down and explain the correlation between the 
 letters and numbers to the pixel start and pixel end of the path? 

This basically means «move to (x,y) coordinate (0,275) and make a line
to (30,0)» which will be the trajectory followed by the animation (in
this specific case).

Further details at http://www.w3.org/TR/SVG11/paths.html

Regards,

  Helder Magalhães


P.S.: have you tried your site with other SVG implementation other
than IE+ASV? I did and apparently I doesn't work at all in Firefox
(Opera seems fine, though). Main issue seems to be main.svg (other
files are OK) being Gzip compressed while server isn't properly
configured to (not sending Content-Encoding HTTP header, see
http://jwatt.org/svg/authoring/#server-configuration for useful
information regarding this); using svgz extension may also help a
bit, at least in diagnosing!



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[svg-developers] Re: help me pleaese

2007-05-28 Thread heldermagalhaes
If you simply want to integrate PHP values into SVG content, one would
simply compute the values before the document starts and later include
them in the proper places by using inline PHP commands. Nice sample at:

http://www.carto.net/papers/svg/samples/serverside_svg_php.shtml

On the other hand, if you want to generate SVG content using PHP, an
answer may be at:

http://wiki.svg.org/Server-Side_SVG#PHP

Hope this helps,

  Helder Magalhães



--- In svg-developers@yahoogroups.com, abdelhediiahmed
[EMAIL PROTECTED] wrote:

 please;
 
 is there someone who can tell me how to to include php scripts in svg 
 documents ?
 I mean how to include values of php script in asvg document.
 Thanks





-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[svg-developers] Re: svg on IE and Firefox

2007-04-09 Thread heldermagalhaes
This can be due to an issue with SVG support in Internet Explorer in a
computer with Visual Studio 2005 installed:

http://support.microsoft.com/kb/916442

In a glance, if you aren't able to follow Martin Honnen's suggestion
(if you don't have server administrative access, for example) you can
try embedding your SVG file in an HTML file and add equivalent
information:

embed src=YOUR_FILENAME.svg
type=image/svg+xml
pluginspace=http://www.adobe.com/svg/viewer/install/;
width=100% height=100% /

In the code snippet above, type is the key attribute to solve the
issue with IE+VS2005. This code snippet doesn't:

-- Help solving the Click here to activate this control;
-- Foresees the use of object instead of embed in Firefox and
Opera (embed is deprecated but Adobe SVG Viewer works better using it).

Both these small details have plenty of information around on how to
fix them. I only wanted to show a simple way to get around this
specific issue.

Regards,

  Helder


--- In svg-developers@yahoogroups.com, fuli zhang [EMAIL PROTECTED] wrote:

 The following svg file, including the animation, is displayed on the
Firefox browser very nice.  But when opened with the IE browser, only
the original code comes up to the screen.  There is no graphics at
all.  I've tested it on two computers.  The results are same.  The
file is displayed OK on both IE and FF offline. 
 
 http://www.pinyinology.com/ontology/wang2.svg
 
 If possible, please help.  Thanks. 
 
  
 -
 Don't be flakey. Get Yahoo! Mail for Mobile and 
 always stay connected to friends.
 
 [Non-text portions of this message have been removed]





-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/