You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Jeremy E. Denton" <jd...@galdosinc.com> on 2002/03/11 22:20:43 UTC

Batik 1.5 and basic attribute support


Hey,

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

	Anyway of getting around it?

Jeremy E. Denton
----------------------------------------------------------------------------
Software Developer | Privileged or confidential information may be contained
Galdos Systems Inc | in this message. If this message was not intended for
                   | you, destroy it and notify us immediately. Opinions,
phone:             | conclusions, recommendations, and other information
(604)484-2762      | recommendations, and other information presented in
fax:               | this message are not given or necessarily endorsed by
(604)484-2755      | my employer or firm.
----------------------------------------------------------------------------




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


Re: Batik 1.5 and basic attribute support

Posted by Chris Lilley <ch...@w3.org>.
On Monday, 11 March, 2002, 22:28:43, Thomas wrote:

>>>>>> "JD" == Jeremy E Denton <jd...@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


Batik 1.5 and basic attribute support

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "JD" == Jeremy E Denton <jd...@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?

    There is a reason for this.  These are in fact CSS properties they
are not actually XML attributes :) When you use 'fill="black"' you are
actually changing a 'presentation attribute' which is transparently
converted to a zero specificity CSS rule (I'm not a CSS head so if the
wording is off a bit please don't shoot me).

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

JD> 	Anyway of getting around it?

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

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