xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lilley <ch...@w3.org>
Subject Re: Batik 1.5 and basic attribute support
Date Thu, 14 Mar 2002 00:22:30 GMT
On Monday, 11 March, 2002, 22:28:43, Thomas wrote:

>>>>>> "JD" == Jeremy E Denton <jdenton@galdosinc.com> writes:

JD>>     The additions from 1.1 to 1.5b are great. I've been exploring
JD>> them and it really great to see. The only thing that confounds me
JD>> is that there doesn't seem to be support for changing basic
JD>> attribute values like fill or stroke.  I mean one of the most
JD>> basic and common uses for scripting in SVG is changing the colour
JD>> of an object as the mouse passes over it. Anyone know if there is
JD>> a reason for this?

TED>     There is a reason for this.  These are in fact CSS properties they
TED> are not actually XML attributes :)

Well to be less mysterious they *are* of course XML attributes, but
what those attributes do is contribute to the eventual computed value
of the identically-named CSS property which is also influenced by
internal and external style sheets, style attributes, and the users
own style sheet.

TED> When you use 'fill="black"' you are
TED> actually changing a 'presentation attribute' which is transparently
TED> converted to a zero specificity CSS rule (I'm not a CSS head so if the
TED> wording is off a bit please don't shoot me).

Its spot on. Relax.

TED>     The end result is that these 'basic' things are _very_ hard to do
TED> correctly and efficently in animation (consider changing a fill on a
TED> 'g' must then cascade down to it's children).  To properly support
TED> them we are in the processes of completely rewriting the current CSS
TED> engine.

Whoopee! Yes, there are a bunch of optimizations that can be made, no doubt.

JD>>     Anyway of getting around it?

TED>     Only really ugly ways (like cloning the node changing the
TED> presentation attribute and replacing the original with the new one).

I would add 'download Batik 1.5 non beta'


-- 
 Chris                            mailto:chris@w3.org


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message