After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 142808 - Tablet pressure scaled by 2 = too much
Tablet pressure scaled by 2 = too much
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.0.x
Other Linux
: Normal normal
: 2.0
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-05-19 23:18 UTC by Philip L
Modified: 2004-05-24 13:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
image of brush strokes with and without 2x scale factor (4.66 KB, image/png)
2004-05-19 23:21 UTC, Philip L
  Details
patch against 2.0.1 making scale factor 1.25 (4.92 KB, patch)
2004-05-19 23:23 UTC, Philip L
none Details | Review
patch against 2-0 branch making scale factor 1.5 (5.49 KB, patch)
2004-05-22 08:17 UTC, Philip L
none Details | Review
PRESSURE_SCALE defined in gimppaintcore.h (6.25 KB, patch)
2004-05-22 20:19 UTC, Philip L
none Details | Review

Description Philip L 2004-05-19 23:18:09 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.
Comment 1 Philip L 2004-05-19 23:21:05 UTC
Created attachment 27858 [details]
image of brush strokes with and without 2x scale factor
Comment 2 Philip L 2004-05-19 23:23:24 UTC
Created attachment 27859 [details] [review]
patch against 2.0.1 making scale factor 1.25
Comment 3 Sven Neumann 2004-05-21 15:26:47 UTC
Looks reasonable, but why 1.25, not 1.0?
Comment 4 Sven Neumann 2004-05-21 15:29:50 UTC
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.
Comment 5 Philip L 2004-05-21 16:48:41 UTC
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)
Comment 6 Sven Neumann 2004-05-21 17:12:49 UTC
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.
Comment 7 Philip L 2004-05-21 17:29:37 UTC
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."
Comment 8 Philip L 2004-05-21 18:11:06 UTC
(maybe even through a plug-in)
Comment 9 Philip L 2004-05-22 08:17:16 UTC
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.
Comment 10 Sven Neumann 2004-05-22 10:30:21 UTC
Could we have the constant (1.5) as a define in a common header please?
Comment 11 Philip L 2004-05-22 20:19:12 UTC
Created attachment 27939 [details] [review]
PRESSURE_SCALE defined in gimppaintcore.h
Comment 12 Sven Neumann 2004-05-24 13:05:44 UTC
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.