Thanks Cameron for fast reply
but what is the type (class) of 'bgRect' with a method 'getStyle' in your
example and how to get it?
Maik
----- Original Message ----- 
From: "Cameron McCormack" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 06, 2004 8:45 AM
Subject: Re: how to get parts of the 'style' attribute


> Hi Maik.
>
> Maik Schrer  proveo GmbH:
> > I'm new to batik and need to change parts of  a 'style' attribute in a
given
> > SVG.
> > For example: read and change the  visibility of an element:
> > <rect id="bg" x="0" y="0" width="800" height="600"
> > style="visibility:hidden;fill:rgb(0,0,255)"/>
> > Is this possible with BATIK ?
>
> Certainly.  In script you can use the style property of the element to
> get a CSSStyleDeclaration object that corresponds to the style
> attribute.
>
>   var currentVisibility = bgRect.style.getProperty("visibility").cssText;
>   bgRect.style.setProperty("visibility", "visible");
>
> Similarly from Java:
>
>   String currentVisibility =
>   bgRect.getStyle().getProperty("visibility)".getCssText();
>   bgRect.getStyle().setProperty("visibility", "visible");
>
> Cameron
>
> -- 
> Cameron McCormack
> |  Web: http://mcc.id.au/
> |  ICQ: 26955922
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to