divisor attribute for feconvolvematrix (default value UI)

Bug #193926 reported by Felipe "Juca" Sanches
8
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Low
Unassigned

Bug Description

At the filter effects dialog, the user can set the divisor attribute (of the feconvolvematrix filter primitive).

The SVG spec says that:
"The default value is the sum of all values in kernelMatrix, with the exception that if the sum is zero, then the divisor is set to 1."

The divisor parameter should be updated in sync with the matrix attribute widget

Tags: filters-svg
Revision history for this message
Christophe Dehais (christophe-dehais) wrote :

The following patch implements the following solution:
- change the 'divisor' slider range to accept negative values
- allow a SpinSlider to change value without affecting the underlying attribute

So as long as the user does not touch the slider, the divisor value is set to the kernel elements sum as the spec requires.
As soon as the slider is used, the divisor value is considered set and will not be synched with the kernel matrix anymore.

Known issue: deleting the divisor attribute in the XML editor set the attribute back to its default, but the slider is not updated correctly.

Revision history for this message
Thomas Ibbotson (thomas-ibbotson) wrote :

I'm assigning this bug to Ivan Louette, as it seems he might be the best person to look at this. The patch will not apply against SVN r21180 as the code has been changed since this patch was created.

Changed in inkscape:
assignee: nobody → ivan-louette
status: New → In Progress
Revision history for this message
Preben S (prsodk) wrote :

Patch attached.

When the slider is set to zero, the divisor is automatically determined.
Zero is now the default value.
Negative divisors are not enabled (except when auto).

Changed in inkscape:
assignee: ivan-louette → nobody
Revision history for this message
ivan louette (ivan-louette) wrote : Re : [Bug 193926] Re: divisor attribute for feconvolvematrix (default value UI)

Thanks and no problem ;-)

Glad you are interested in filters !

ivan

________________________________
De : Thomas Ibbotson <email address hidden>
À : <email address hidden>
Envoyé le : Lundi, 20 Avril 2009, 17h31mn 20s
Objet : [Bug 193926] Re: divisor attribute for feconvolvematrix (default value UI)

** Changed in: inkscape
     Assignee: ivan louette (ivan-louette) => (unassigned)

--
divisor attribute for feconvolvematrix (default value UI)
https://bugs.launchpad.net/bugs/193926
You received this bug notification because you are a bug assignee.

Status in Inkscape: A Vector Drawing Tool: In Progress

Bug description:
At the filter effects dialog, the user can set the divisor attribute (of the feconvolvematrix filter primitive).

The SVG spec says that:
"The default value is the sum of all values in kernelMatrix, with the exception that if the sum is zero, then the divisor is set to 1."

The divisor parameter should be updated in sync with the matrix attribute widget

Revision history for this message
Preben S (prsodk) wrote :

Made a mistake editing the patch, so update is here.

Revision history for this message
Jaspervdg (jaspervdg) wrote :

Patch applied (with a few small changes). However, this still results in divisor="0" (an error condition according to the spec) being written to a file, when it should be left out. So I would advise on keeping this bug open until this issue is also resolved.

Revision history for this message
Preben S (prsodk) wrote :

When adding a new convolve matrix filter, it comes up correctly with no divisor attribute in the SVG data. It is when the slider is moved away from zero, the attribute appears, and then it does not disappear again, when the slider is set to zero.

The divisor is not updated correctly, when the divisor attribute is just deleted with the XML editor. Setting the divisor to zero and then deleting it works correctly.

So, if the slider has been touched, how can the divisor attribute be deleted, when the slider is set to zero again?

jazzynico (jazzynico)
tags: added: filters-svg
Revision history for this message
jazzynico (jazzynico) wrote :

Nobody seems to be working on it. Setting status to Triaged.

Changed in inkscape:
importance: Undecided → Low
status: In Progress → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.