xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: Using the CSSEngine - determining the origin of styles
Date Sat, 11 Sep 2004 14:49:52 GMT
Hi Rick,

    Your code looks a little odd to me (in that I don't really
understand what you are trying to do).  But basically seems
sound.  It really seems to me that you must have one of the
stylesheets active otherwise I can't imagine where you would
get things like your values for stroke-opacity, and stroke-width
(or even the value you have for fill).  These aren't even
remotely associated with the defaults for these attributes.

    I would look at the Origin of each of these to see where
they are coming from.  You might also consider instrumenting
the Batik source to see who is setting what.

Beton, Richard wrote:

> This seems to work OK, except that I can't determine the origin of each 
> style. The 'flags' variable should (it appears) contain 
> StyleMap.AUTHOR_ORIGIN only if the styles don't come from the user agent 
> stylesheet or user stylesheet.  I set both these stylesheets null in my 
> CSSEngine, expecting there to be no default styles therefore.  But it 
> seems I still get some default styles.  I don't understand where these 
> come from.
> 
> For example, with this SVG...

> ...I expect to see no CSS styles on the rect.  The rectangle should be 
> filled red and with black stroke, based only on the presentation 
> attributes.  But in fact I get
> fill: rgb(85, 85, 85)
> fill-rule: evenodd
> stroke:  #000
> stroke-opacity: 0.5
> stroke-width: 10pt  (computed value 3.5277777)
> 
> I've probably done something daft. Can you help me by pointing out what 
> I might have done wrong?
> 
> TIA,
> Rick
> 
> 
> 
> 
> 
> 
> 


---------------------------------------------------------------------
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