Discussion:
[Inkscape-user] Overriding colors in cloned objects
Dave Lawrence
2007-05-25 01:40:12 UTC
Permalink
Hi,

I am trying to create a set of cloned objects all of which have the same
(inherited) fill color, but have different stroke colors. According to all
available documentation, the 'Unset color' means that the fill or stroke
color will be inherited and this seems to work perfectly. However, if one
of cloned objects is set to a specific color nothing appears to happen. The
object colors shown on the status bar seem to show the correct information:
fill is 'unset', stroke is red. The XML looks correct too: xlink:href to the
'parent' object and 'style' containing 'stroke:red'.

Have I missed something?

Many thanks,
Stathis Sideris
2007-05-25 01:51:40 UTC
Permalink
Hello Dave,

The red stroke will only show if you remove the stroke from the parent
object. You will have to do this from the "style" parameter in the XML
of the parent, not from the dialog. If you set the stroke to "X" from
the dialog, then the XML becomes "stroke:none" which is inherited by
both children, overwriting the red stroke. If you remove "stroke:black"
from the parent, you get to see the red stroke in the child.

In my opinion, this is another area where the GUI is being a bit
uninformative, but I'm not sure how all this could be shown without
confusing the user further.

Stathis
Post by Dave Lawrence
Hi,
I am trying to create a set of cloned objects all of which have the
same (inherited) fill color, but have different stroke colors.
According to all available documentation, the 'Unset color' means that
the fill or stroke color will be inherited and this seems to work
perfectly. However, if one of cloned objects is set to a specific
color nothing appears to happen. The object colors shown on the
status bar seem to show the correct information: fill is 'unset',
stroke is red. The XML looks correct too: xlink:href to the 'parent'
object and 'style' containing 'stroke:red'.
Have I missed something?
Many thanks,
bulia byak
2007-05-25 02:16:30 UTC
Permalink
Post by Stathis Sideris
Hello Dave,
The red stroke will only show if you remove the stroke from the parent
object. You will have to do this from the "style" parameter in the XML
of the parent, not from the dialog.
Yes you can do this from the Fill and Stroke dialog. No need to go
into XML. Use the button with the ? sign.
--
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org
Stathis Sideris
2007-05-25 02:23:12 UTC
Permalink
Post by bulia byak
Post by Stathis Sideris
Hello Dave,
The red stroke will only show if you remove the stroke from the parent
object. You will have to do this from the "style" parameter in the XML
of the parent, not from the dialog.
Yes you can do this from the Fill and Stroke dialog. No need to go
into XML. Use the button with the ? sign.
Great! I always wondered what the "?" button did. :-)
Dave Lawrence
2007-05-25 11:02:34 UTC
Permalink
Hi, thanks for replies,

This isn't quite what I meant -- I want the parent object to act like a
'default', i.e. have black stroke and green fill, then clones to inherit
these colours, *BUT* with the option of changing the fill/stroke on some of
them. The help for "?" implies that this is the way round it's meant to
work "make it undefined so it can be inherited", i.e. "inherit if '?'", but
use the local colour if it is given.

In my original clones.svg file, I expect the top (parent) object to be
green/black, the middle to be green/red (with an overridden stroke) and the
bottom to be green/black again as it's just a clone of the top one with both
fill and stroke 'unset'

Many thanks,
Post by Stathis Sideris
Post by bulia byak
Post by Stathis Sideris
Hello Dave,
The red stroke will only show if you remove the stroke from the parent
object. You will have to do this from the "style" parameter in the XML
of the parent, not from the dialog.
Yes you can do this from the Fill and Stroke dialog. No need to go
into XML. Use the button with the ? sign.
Great! I always wondered what the "?" button did. :-)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Inkscape-user mailing list
https://lists.sourceforge.net/lists/listinfo/inkscape-user
bulia byak
2007-05-25 13:49:18 UTC
Permalink
Post by Dave Lawrence
Hi, thanks for replies,
This isn't quite what I meant -- I want the parent object to act like a
'default', i.e. have black stroke and green fill, then clones to inherit
these colours, *BUT* with the option of changing the fill/stroke on some of
them.
This is not possible in SVG.
--
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org
Continue reading on narkive:
Search results for '[Inkscape-user] Overriding colors in cloned objects' (Questions and Answers)
4
replies
In java which modifiers are used to declare constant methods?
started 2006-05-02 00:53:42 UTC
programming & design
Loading...