Changed the behaviour of the Gradient Brush to continue with the end color
when using "Once Forward/Backward" modes. Isn't that what was wanted in the first place? It feels much more intuitive and useful to me. Please complain if you don't like this. --Sven
This commit is contained in:
parent
fa079cf36e
commit
3520455686
4 changed files with 27 additions and 23 deletions
|
|
@ -1,3 +1,12 @@
|
|||
Wed Dec 22 22:11:35 CET 1999 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* MAINTAINERS: updated my entry and added Mitch
|
||||
|
||||
* app/paint_core.c: Changed the behaviour of the Gradient Brush to
|
||||
continue with the end color when using "Once Forward/Backward" modes.
|
||||
Isn't that what was wanted in the first place? It feels much more
|
||||
intuitive and useful to me. Please complain if you don't like this.
|
||||
|
||||
Tue Dec 21 08:48:17 CET 1999 Marc Lehmann <pcg@goof.com>
|
||||
|
||||
* MAINTAINERS: Added Gregory McLean as gimp.specs maintainer/
|
||||
|
|
|
|||
19
MAINTAINERS
19
MAINTAINERS
|
|
@ -49,16 +49,10 @@ commit access: yes
|
|||
|
||||
Name: Sven Neuman
|
||||
Email: sven@gimp.org
|
||||
url: http://www-public.rz.uni-duesseldorf.de/~neumanns/gimp/
|
||||
url: http://sven.gimp.org
|
||||
ircnick: Sven
|
||||
expertise: GUI enhancements, Session managment, Script-Fu
|
||||
current work: well, currently there are only a few plans:
|
||||
- helping Wolfgang Hofer with the integration of GAP
|
||||
(GIMP Animation Plugin)
|
||||
- looking into german translation and i18n stuff
|
||||
- more GUI enhancements like displaying lengths in
|
||||
realworld units (cm, inch) now that we have
|
||||
resolution info in the core
|
||||
expertise: GUI, Pressure Support, Export, Session managment, Script-Fu
|
||||
current work: everything that's broken
|
||||
commit access: yes
|
||||
|
||||
Name: Marc Lehmann
|
||||
|
|
@ -191,3 +185,10 @@ expertise: rpm specs file (and probably some more ;)
|
|||
current work: gimp.specs file
|
||||
commit access: yes
|
||||
|
||||
Name: Michael Natterer
|
||||
Email: mitch@gimp.org
|
||||
ircnick:
|
||||
expertise: GUI, Help System, Context System
|
||||
current work:
|
||||
commit access: yes
|
||||
|
||||
|
|
|
|||
|
|
@ -743,23 +743,20 @@ paint_core_get_color_from_gradient (PaintCore *paint_core,
|
|||
{
|
||||
double y;
|
||||
double distance; /* distance in current brush stroke */
|
||||
double temp_opacity; /* so i can blank out stuff */
|
||||
|
||||
distance = paint_core->pixel_dist;
|
||||
y = ((double) distance / gradient_length);
|
||||
temp_opacity = 1.0;
|
||||
|
||||
/* for the once modes, set alpha to 0.0 after the first chunk */
|
||||
if (y >= 1.0 && (mode == ONCE_FORWARD || mode == ONCE_BACKWARDS))
|
||||
temp_opacity = 0.0;
|
||||
/* for the once modes, set y close to 1.0 after the first chunk */
|
||||
if ( (mode == ONCE_FORWARD || mode == ONCE_BACKWARDS) && y >= 1.0 )
|
||||
y = 0.9999999;
|
||||
|
||||
if ( ((int)y & 1 && mode != LOOP_SAWTOOTH) || mode == ONCE_BACKWARDS )
|
||||
if ( (((int)y & 1) && mode != LOOP_SAWTOOTH) || mode == ONCE_BACKWARDS )
|
||||
y = 1.0 - (y - (int)y);
|
||||
else
|
||||
y = y - (int)y;
|
||||
|
||||
gradient_get_color_at (gimp_context_get_gradient (NULL), y, r, g, b, a);
|
||||
*a = (temp_opacity * *a);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -743,23 +743,20 @@ paint_core_get_color_from_gradient (PaintCore *paint_core,
|
|||
{
|
||||
double y;
|
||||
double distance; /* distance in current brush stroke */
|
||||
double temp_opacity; /* so i can blank out stuff */
|
||||
|
||||
distance = paint_core->pixel_dist;
|
||||
y = ((double) distance / gradient_length);
|
||||
temp_opacity = 1.0;
|
||||
|
||||
/* for the once modes, set alpha to 0.0 after the first chunk */
|
||||
if (y >= 1.0 && (mode == ONCE_FORWARD || mode == ONCE_BACKWARDS))
|
||||
temp_opacity = 0.0;
|
||||
/* for the once modes, set y close to 1.0 after the first chunk */
|
||||
if ( (mode == ONCE_FORWARD || mode == ONCE_BACKWARDS) && y >= 1.0 )
|
||||
y = 0.9999999;
|
||||
|
||||
if ( ((int)y & 1 && mode != LOOP_SAWTOOTH) || mode == ONCE_BACKWARDS )
|
||||
if ( (((int)y & 1) && mode != LOOP_SAWTOOTH) || mode == ONCE_BACKWARDS )
|
||||
y = 1.0 - (y - (int)y);
|
||||
else
|
||||
y = y - (int)y;
|
||||
|
||||
gradient_get_color_at (gimp_context_get_gradient (NULL), y, r, g, b, a);
|
||||
*a = (temp_opacity * *a);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue