Hi Urs,
Urs Reupke wrote:
after good progress due to your last tips (thanks again),
No problem.
Trying to set a text color, which I thought to be one of the easiest of
tasks. I wrote this code:
This code looks right to me. is there any chance that you are
doing something silly like setting the text to the same color as
the background?
After some initial hindrances were quickly solved by use of the SVG
specification, everything seemed to be in order to me, but things
still are not working: Upon calling the method, the text simply
disappears.
Can you still select the text?
I take it other modifications in the document work
(i.e. the problem isn't in supporting dynamic updates in general).
Using the Eclipse debugger, I had a look into the object
structure, and noted that the SVGTextElement
has no direct "fill"-attribute, instead, the color value seems to be
stored in a "ComputedStyleMap" - which
I don't know how to access.
This is because fill is a CSS property not an XML attribute
what you are setting is called a 'presentation attribute' which
feeds into the CSS Cascade. In the end you shouldn't generally
need to know much about all this, it should just work.
'.hasAttribute("fill")', however, returned true when called and
'.getAttribute("fill")' confirmed that
the fill attribute was set to the RGB-value I specified.
What bothers me is that a mostly identical piece of code is used to set
an area's background-color
and works perfectly well - do you know of a way to solve this?
What do you mean by setting an area's background color. You mean
setting the fill for a rectangle or something?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]