Issue #2303 - Please add Constant type of gradient interpolation ...

... to make multi-color hard-edge gradient fills possible

Add a new "step" gradient-segment blending function, which is 0
before the midpoint, and 1 at, and after, the midpoint.  This
creates a hard-edge transition between the two adjacent color stops
at the midpoint.  Creating such a transition was already possible,
but required duplicating the same color at the opposing ends of two
adjacent stops, which is cumbersome.
This commit is contained in:
Ell
2018-10-02 21:13:16 -04:00
parent be84c6e766
commit 68bf99e806
7 changed files with 32 additions and 4 deletions

View File

@ -708,6 +708,7 @@ gimp_gradient_segment_type_get_type (void)
{ GIMP_GRADIENT_SEGMENT_SINE, "GIMP_GRADIENT_SEGMENT_SINE", "sine" },
{ GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING, "GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING", "sphere-increasing" },
{ GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING, "GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING", "sphere-decreasing" },
{ GIMP_GRADIENT_SEGMENT_STEP, "GIMP_GRADIENT_SEGMENT_STEP", "step" },
{ 0, NULL, NULL }
};
@ -724,6 +725,7 @@ gimp_gradient_segment_type_get_type (void)
/* Translators: this is an abbreviated version of "Spherical (decreasing)".
Keep it short. */
{ GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING, NC_("gradient-segment-type", "Spherical (dec)"), NULL },
{ GIMP_GRADIENT_SEGMENT_STEP, NC_("gradient-segment-type", "Step"), NULL },
{ 0, NULL, NULL }
};