Skip to content

Commit b77b7db

Browse files
PaulWesselgithub-actions[bot]
authored andcommitted
Use current pen with color is changing (#4084)
See the problem reported on the forum. The problem was we assigned the given color to the initial W.pen, not current_pen, and hence we lost the thickness.
1 parent 0576cc3 commit b77b7db

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/psxy.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,9 +2047,8 @@ EXTERN_MSC int GMT_psxy (void *V_API, int mode, void *args) {
20472047
gmt_illuminate (GMT, Ctrl->I.value, default_fill.rgb);
20482048
}
20492049
if (Ctrl->W.cpt_effect) {
2050-
if (Ctrl->W.pen.cptmode & 1) { /* Change pen color via CPT */
2051-
gmt_M_rgb_copy (Ctrl->W.pen.rgb, current_fill.rgb);
2052-
current_pen = Ctrl->W.pen;
2050+
if (Ctrl->W.pen.cptmode & 1) { /* Change current pen color via CPT */
2051+
gmt_M_rgb_copy (current_pen.rgb, current_fill.rgb);
20532052
gmt_setpen (GMT, &current_pen);
20542053
}
20552054
if ((Ctrl->W.pen.cptmode & 2) == 0 && !Ctrl->G.active) /* Turn off CPT fill */

0 commit comments

Comments
 (0)