diff --git a/ChangeLog b/ChangeLog index 03c7d95..76afd61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-12-02 Fred Kiefer + + * Source/gsc/GSGState.m (-setColor:state:): Don't copy values onto themselves. + 2018-09-16 Fred Kiefer * Source/opal/OpalContext.m (-initWithGraphicsPort:flipped:): Implement. diff --git a/Source/gsc/GSGState.m b/Source/gsc/GSGState.m index e71de15..7fec7eb 100644 --- a/Source/gsc/GSGState.m +++ b/Source/gsc/GSGState.m @@ -130,10 +130,14 @@ in the current color */ - (void) setColor: (device_color_t *)color state: (color_state_t)cState { - if (cState & COLOR_FILL) - fillColor = *color; - if (cState & COLOR_STROKE) - strokeColor = *color; + if ((cState & COLOR_FILL) && (&fillColor != color)) + { + fillColor = *color; + } + if ((cState & COLOR_STROKE) && (&strokeColor != color)) + { + strokeColor = *color; + } cstate = cState; DESTROY(pattern); }