Skip to content

Implement opacity and saturate filter functions

John Ledbetter requested to merge johnl/librsvg:more-filters into master

saturate and opacity both take a single optional <number-percent> argument, in the same manner as sepia from !519 (merged), so we can reuse that parsing functionality.

saturate is implemented as a color matrix operation; opacity is a component transfer, per the specs:

There's a third (if-y) change here that replaces some of the duplicated filter test stuff with a macro. Not sure how I feel about that approach so it's a separate commit; if it's too ugly it's easy to drop.

Besides the included tests, I verified the rsvg-convert output looks appropriate compare to Firefox's output.

This address #715 (closed) and #716 (closed).

Edited by John Ledbetter

Merge request reports