[Qgis-developer] Transparency/Opacity (was: Outline/border -> stroke? )

Matthias Kuhn matthias at opengis.ch
Mon Feb 20 06:31:34 PST 2017


I'd say in the API we should be closer to the data and hence use 0-255, in the slider we convert it to 0-100%.
We could possibly have a slider that allows for 255 positions but prints numbers from 0%-100%?

Are you aware of systems where there are more values than 8 bits for the alpha channel (for which we should prepare)?
It wouldn't be a much bigger deal to go this road, but I think it shouldn't be purely prophylactic without real needs in mind.

Matthias

On 02/20/2017 03:19 PM, John Hawkinson wrote:
> > An outstanding question is what range we should allow? Behind the
> > scenes it's generally going to be converted to a 0-255 value, but for
> > users a 0-100% may be more explanatory. Opinions?
>
> The tools I use again express opacity in 0-100%, and I think that's
> the correct thing for the user interface. Why should users presume
> the internals are going to be 8-bit unsigned? Why shouldn't it be
> 0-65536? Or floating point?
>
> > The API is ALL OVER THE PLACE here, and should also be fixed. We have
> > a mix of transparency/opacity/alpha and ranges of 0-1, 0-100, 0-255.
> > It's confusing for developers too!
>
> So, I imagine at some point in the future someone is going to
> decide 8-bit alpha channels are too limiting. The API should
> probably be forward-looking with respect to that. I'm not
> sure exactly what that means, but to me it suggests
> not 0-255. Maybe 0-1 floating point. But I dunno.
>
> --jhawk
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>



More information about the Qgis-developer mailing list