Skip to content

Ensure font/stroke color is reset internally - #5170

Merged
PaulWessel merged 1 commit into
masterfrom
font-color-fix
Apr 25, 2021
Merged

PaulWessel merged 1 commit into
masterfrom
font-color-fix

Conversation

@PaulWessel

Copy link
Copy Markdown
Contributor

GMT keeps track of the current colors for fill, font, and stroke in memory so that we don't keep sending the same color request in PostScript. However, when some activities have been placed under a gsave/grestore branch then once we exit that branch, PostScript will revert to the previous color setting, which is not remembered inside GMT. The solution to this problem is to set the relevant colors to "not set" (-1, -1, -1) so that the very next call for a color will always be executed. This was missing in this new function related to subtitle and title. I added some comments in the new gmt_map_title function to remind us of this.
Closes #5156.

GMT keeps track of the current colors for fill, font, and stroke so that we dont keep sending the same color request in PostScript.  However, when some activities have been placed under a gsave/grestore branch then onc we exit PostScript will revert to the previous setting, which is not remembered inside GMT.  The solution to this is to set the relevant colors to "not set" (-1, -1, -1) so that the very next call for a color will always be executed.  I added some comments in the new gmt_map_title function to remind us of this.
Closes #5156.
@PaulWessel PaulWessel added this to the 6.2.0 milestone Apr 25, 2021
@PaulWessel PaulWessel self-assigned this Apr 25, 2021
@PaulWessel
PaulWessel requested a review from KristofKoch April 25, 2021 00:56
@PaulWessel
PaulWessel merged commit b360c4a into master Apr 25, 2021
@PaulWessel
PaulWessel deleted the font-color-fix branch April 25, 2021 02:51
@maxrjones maxrjones mentioned this pull request May 3, 2021
37 of 38 tasks

This branch was previously deployed

1 inactive deployment
Preview — 74f0d1ca Deployed Apr 25, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FONT_ANNOT black ignored with -B+t+s

2 participants