Opacity of clones

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Opacity of clones

Postby tylerdurden » Sun Oct 19, 2014 1:55 am

The subject of coloring clones was raised in another topic and an example shows an interesting phenomenon: Clones of an unset original seem to have the alpha of the stroke changeable, but not the alpha of the fill. The slider moves, but the fill does not change.


Original on the left with unset colors, clone on the right. Spiral in the background.
CloneOpacity.jpg
Notice alpha is set to half, but the green fill is opaque. The stroke alpha is set to half and is semi-transparent.
CloneOpacity.jpg (225.35 KiB) Viewed 3302 times


Maybe I'm missing something?
Attachments
CloneOpacity1.svg
(5.61 KiB) Downloaded 193 times
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Opacity of clones

Postby Xav » Sun Oct 19, 2014 2:36 am

With a bit of investigation, I think I've found the cause of this "bug". The "fill-opacity" value gets set in the parent object's XML, which then prevents the clones' opacity from working. The question is whether that property should be removed when the fill is unset - I would argue that it should, because unsetting the fill also removes the UI for changing the fill-opacity, suggesting that the corresponding value has also been unset.

Using the XML editor you can remove the "fill-opacity" property from the source object's "style" attribute, then the clones will work as you expect. This seems to be the case on both 0.48.x and the current 0.91 pre-release.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Opacity of clones

Postby tylerdurden » Sun Oct 19, 2014 3:04 am

Xav wrote:The question is whether that property should be removed when the fill is unset - I would argue that it should, because unsetting the fill also removes the UI for changing the fill-opacity, suggesting that the corresponding value has also been unset.


Thanks for the explanation Xav. I agree it should be removed when un-setting fill.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Opacity of clones

Postby brynn » Sun Oct 19, 2014 3:15 am

Ooohh, I see now. No I did not understand at first. I didn't realize you meant you were changing the clone after it was cloned. I thought you meant the direct result of the cloning.

However, I cannot reproduce this in 0.48.5. [Edit on Win7, 64-bit] So I agree that it must be a bug. I don't know if my file will be any help, if you only have 0.91pre. But I'll attach a file :D

When I open your file, I cannot change the opacity of the fill either -- only the stroke.

On a related subject, I started with a 5 px stroke to make it easier to see. But the clones' strokes are only 1 px, and hard to see. It looks like your clone doesn't have a 1 px stroke, so maybe that's been fixed (assuming it was a bug)?? I haven't searched LP to confirm, but I think after a bug gets fixed, they move the report to where you can't search them out, anyway. So if that was a bug, I probably can't find it anyway.

Anyway, here's a sample file, fyi :D

( I'd make a screenshot, except the stroke is very hard to see)

PS - I would at least search LP, to find out if it's been reported. Maybe they can fix it before 0.91 stable comes out. I don't think there's a total freeze yet. Although I really have no clue if it would be a quick fix or not.
Attachments
opacityofclones.svg
(9 KiB) Downloaded 194 times

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Opacity of clones

Postby brynn » Sun Oct 19, 2014 3:21 am

But like you're both saying (I think) it doesn't seem like the style of a clone should be changeable (except by editing the original). That's why I didn't understand that you were changing it afterwards. I didn't think it was even possible.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Opacity of clones

Postby tylerdurden » Sun Oct 19, 2014 3:37 am

Unset is a very neat feature. That allows nifty techniques with tiled clones like trace:

http://tavmjong.free.fr/INKSCAPE/MANUAL ... Trace.html

Image
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Opacity of clones

Postby Xav » Sun Oct 19, 2014 6:04 pm

brynn wrote:But like you're both saying (I think) it doesn't seem like the style of a clone should be changeable (except by editing the original). That's why I didn't understand that you were changing it afterwards. I didn't think it was even possible.


Brynn, my next Full Circle tutorial is due out soon and covers exactly this feature. It can be very handy - I use it all the time in my comics. The article also covers a couple of tricks for faking more than one settable fill colour in a clone. It's handy when you need something like a load of spaceships with different colours on them, or a bunch of kids in a classroom with different hair and clothes.


As a quick example: imagine creating some text, then cloning it. By blurring the clone and reducing its opacity you can make a nice drop shadow that's linked to the original, so that when you edit the text the shadow is updated as well. But what if you want the text and the shadow to be different colours?

If you unset the fill on the original it will appear black. If you don't want the main text to be black then you can move the original off-canvas, clone it, and set the clone to the colour you want. Now clone it again and set the blur, opacity and colour for a drop shadow that's a different colour to the main text.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Opacity of clones

Postby tylerdurden » Mon Oct 20, 2014 12:47 am

brynn wrote:PS - I would at least search LP, to find out if it's been reported...

Yep reported last year; seems to be regarded as low priority:
https://bugs.launchpad.net/inkscape/+bug/1183400

At least there is a workaround by editing the XML of the original.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Opacity of clones

Postby Xav » Tue Oct 21, 2014 12:17 am

I've added my name to the "this issue affects me" section on Launchpad, not because it's actually affected me so far, but because I make enough use of unset fills that I'm sure it will at some point. I know it's a low priority, but I'm also sure it can't be a tricky one to fix, so perhaps it would make a good first bug for a prospective Inkscape dev (if only I had the time...).
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter


Return to “Discuss Software Issues”