Feature request #12769

Data defined opacity for vector features

Added by Olivier Dalang over 9 years ago. Updated over 7 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Symbology
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:20868

Description

Hi !

Lately, more and more settings got data-definable. But it seems opacity/transparency was somewhat forgotten !

Of course, it's possible to achieve the result by data-defining the color of each symbol layer, but then one must hardcode the color in the code.

So I'd suggest adding the ability to data-define transparency, which I think can be useful in a lot of cases.

Thanks !!

Olivier


Related issues

Related to QGIS Application - Bug report #13033: Data defined settings at root Marker are copied to child ... Closed 2015-06-23

History

#1 Updated by Karolina Alexiou over 9 years ago

I also noticed that. I will try to implement this soon. It's also nice to have when you have an SVG marker because there you can't set the color.

#2 Updated by Olivier Dalang over 9 years ago

@Karolina do you have an idea when you'd be able to work on this ? I had a look at the source, unfortunately it seems a bit above my C++ skills...

From what I understand, data-defined properties are only possible at symbol layer level.

Data-defined properties at root level (size and rotation for point layers, and width for line layers) seem to be copied to the underlying symbol layers with some intelligence so that they scale/rotate/... proportionally.

This has (at least) two drawbacks :
- it leads to some unexpected behaviour when you add a new symbol layer after having data-defined a root level property (the new symbol layer won't scale/rotate) - I just created #13033
- it's not applicable for opacity, which is defined in the color in the symbol layers

Probably best would be to implement data-defined properties at root symbol level too, instead of copying them to the symbol layers.
This probably means to change the "size" and "width" fields at root symbol level to "scale" (which makes more sense anyways, since the width of the child elements can be different).

Without doing that, implementing data-defined opacity for the whole symbol will be very tricky.

#3 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF