* Source/gsc/GSGState.m (-setColor:state:): Don't copy values onto themselves.

This commit is contained in:
fredkiefer 2018-12-02 12:36:28 +01:00
parent 442eb2515e
commit d9bc28c4ca
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,7 @@
2018-12-02 Fred Kiefer <FredKiefer@gmx.de>
* Source/gsc/GSGState.m (-setColor:state:): Don't copy values onto themselves.
2018-09-16 Fred Kiefer <FredKiefer@gmx.de>
* Source/opal/OpalContext.m (-initWithGraphicsPort:flipped:): Implement.

View file

@ -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);
}