
Contributed by Jos Hirth, with some changes by me:
* Color effects: a new group of extensions in the Color submenu of the Effects menu allows you to adjust all colors of a selection at once. These commands affect both fill and stroke colors, including gradients (but not bitmaps). The commands include Brighter and Darker (adjust brightness by up or down by 10%), Desaturate, Grayscale, Negative, commands for removing or swapping the Red, Green, Blue channels, as well as a Custom command where you can set your own formulas for modifying the color channels. These extensions are a temporary solution; in a future version, similar functionality will be added to Inkscape core.
Adjusting gradient colors may be buggy because a gradient is sometimes shared by more than one object. Also, undoing color changes on gradients exposes a bug where an object seems to "disappear"; this is however only a display issue (probably caused by the order in which gradients and their users are restored on undo) not causing any loss of information. Finally, on large documents and large selections with gradients, Python's XPath code may get quite slow. Despite these shortcomings, I decided to commit this, because it's genuinely useful functionality which was so far missing in Inkscape.

On 11/16/06, Ted Gould <ted@...11...> wrote:
What needs to be done so that you don't distinguish between the two?
1. Interactivity: drag a slider and see the result on the canvas in real time. Not sure how to go about it or is it possible at all.
2. Speed. Python selects document nodes by XPath, which is ridiculously slow.
3. More direct access to Inkscape's internal functions or their equivalents. To start, as I already suggested, it would be nice to pass to extensions the bboxes of all selected objects - calculating these bboxes is very nontrivial, so the only practical solution for an extension that wants to get a bbox of some object is to run Inkscape command line with query params! Also, while Python extensions have some nice little libraries for parsing paths and styles, these libraries are just hacks, they handle more or less reliably only the simplest cases. To fix this, you basically need to either reimplement much of Inkscape in Python, or invent some way for extensions to poke into the internals of a running Inkscape. Again, I'm rather unsure about whether this is at all possible or practical.

bulia byak wrote:
To fix this, you basically need to either reimplement much of Inkscape in Python, or invent some way for extensions to poke into the internals of a running Inkscape. Again, I'm rather unsure about whether this is at all possible or practical.
lo,
not the trouble to be sure doing this, IMO. The real trouble is that giving a plug-in the ability to access internal methods could be a source of instability, particularly in the case for plug-ins that are not provided by the team, but by anyuser. I myself am not sure to code so good and in fact i don't what one day Inkscape crashes because someone used one of my bad extension.
May be 2 interfaces would be nice : - one accessing internals - one not.
in fact, may be it could be done this way : - give a signature to some extension and their release - This signature is stored in an internal base (or simply via a linked XML file) - The first interface is used if the plugin is signed up, only.
This also mean that the team should have a look on most part of the plugin, which is an extra work. May be having a "repository" such as "registry.gimp.org" could help. We would just have to do plugin tests just before an inkscape release to sign new plugin.
pygmee
-------------------- http://inkscape.le-radar.com http://www.le-radar.com/?mm/inkscape

On Wed, 2006-11-15 at 05:45 -0400, bulia byak wrote:
as well as a Custom command where you can set your own formulas for modifying the color channels. These extensions are a temporary solution; in a future version, similar functionality will be added to Inkscape core.
It's worth noting that SVG filters can be used for a similar purpose.
-mental

On 11/16/06, MenTaLguY <mental@...3...> wrote:
On Wed, 2006-11-15 at 05:45 -0400, bulia byak wrote:
as well as a Custom command where you can set your own formulas for modifying the color channels. These extensions are a temporary solution; in a future version, similar functionality will be added to Inkscape core.
It's worth noting that SVG filters can be used for a similar purpose.
Yes, and when we support them they will be useful for things like clones, but I think we'll still need the real color adjustment tools that go out and actually change the colors of objects. For example, in a complex photorealistic drawing, I may want to do such adjustments repeatedly, on various overlapping selections. I don't think I would want these adjustments to create clumsy piles of effects on objects; what I want is the simple and straightforward color change in the objects' styles.
participants (4)
-
bulia byak
-
cedric GEMY
-
MenTaLguY
-
Ted Gould