GNOME Bugzilla – Bug 142808
Tablet pressure scaled by 2 = too much
Last modified: 2004-05-24 13:05:44 UTC
I noticed recently that it's somewhat difficult to make lighter marks with pressure-controlled opacity using the paintbrush. I also noticed recently that the pressure value (from 0-1) is multiplied by 2 before being used for opacity and rate (but not size) in the paint tools. I am attaching an image that illustrates the range of opacities that is easily obtained with and without this scale factor. I tried to be fair. It is definitely possible to get ~1.0 pressure without scaling if you press down hard enough, but the darker marks that I make are usually between 0.7 and 0.8 (which end up being scaled to as high as 1.6). As a temporary fix I am attaching a patch that replaces the 2.0 scale factors with 1.25, which I found to be a much more reasonable value. In the long run, though, I would like see a gui control for the scale factor, perhaps in the tool options; it would probably be less tedious if there were a single scale factor for all paint tools. This is really the job of the driver, but at the moment it has no gui and is not easily or conveniently configured.
Created attachment 27858 [details] image of brush strokes with and without 2x scale factor
Created attachment 27859 [details] [review] patch against 2.0.1 making scale factor 1.25
Looks reasonable, but why 1.25, not 1.0?
Bug #124225 is essentially about the same problem. Would be nice to get the two reports merged. I am also willing to accept a patch that changes the pressure behaviour to the better. If it's simple as the patch attached here, then it can also go into the stable branch.
Well, the right end of the non-scaled brush stroke in the image may look black, but it's probably more like RGB=25. You'd have to press very hard to get a fully opaque mark with no scaling. 1.25 may be slightly low, however, if bug #124225 is addressed, since part of the reason it can get full opacity fairly easily is that the overlapping brush marks add to each other. If 124225 is fixed before there is a way to control pressure scaling, it would be necessary to make the scale factor something like 1.5. I'm attempting to write in a scale slider using prop_scale_entry. Would "Scale:" in the Pressure Sensitivity frame be a clear enough label? (with a proper tooltip)
Probably, but it would not be accepted in the stable branch because it's a new feature. I am also not sure if we want to have the pressure control per tool (as part of the tool options) or globally (in the preferences). We also probably want more finegrained control than a single scale slider but there's a different enhancement request for that.
well.. as for fine-grained control, the linux wacom driver uses a bezier curve, specified by 4 parameters (which I haven't actually tried). This might be unrealistic, but perhaps GIMP could control it directly? From linuxwacom.sf.net: "xsetwacom uses libwacomcfg.so to communicate with Wacom XFree86 driver, wacom_drv.o."
(maybe even through a plug-in)
Created attachment 27926 [details] [review] patch against 2-0 branch making scale factor 1.5 I've written a patch for bug #124225. If it's accepted, this should probably go with it until a better fix (e.g. a libwacomcfg plugin) is made.
Could we have the constant (1.5) as a define in a common header please?
Created attachment 27939 [details] [review] PRESSURE_SCALE defined in gimppaintcore.h
2004-05-24 Sven Neumann <sven@gimp.org> Applied a patch from Philip Lafleur (bug #142808): * app/paint/gimppaintcore.h: define PRESSURE_SCALE to 1.5 * app/paint/gimpairbrush.c * app/paint/gimpclone.c * app/paint/gimpconvolve.c * app/paint/gimpdodgeburn.c * app/paint/gimperaser.c * app/paint/gimppaintbrush.c * app/paint/gimpsmudge.c: use the PRESSURE_SCALE constant.