MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / gmtplot_fancy_map_boundary

Function gmtplot_fancy_map_boundary

src/gmt_plot.c:1363–1404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1361}
1362
1363GMT_LOCAL void gmtplot_fancy_map_boundary (struct GMT_CTRL *GMT, struct PSL_CTRL *PSL, double w, double e, double s, double n) {
1364 double fat_pen, thin_pen;
1365 bool dual = false;
1366 unsigned int cap = PSL->internal.line_cap;
1367
1368 if (!(GMT->current.setting.map_frame_type & GMT_IS_FANCY)) { /* Draw plain boundary and return */
1369 gmtplot_wesn_map_boundary (GMT, PSL, w, e, s, n);
1370 return;
1371 }
1372
1373 PSL_setcolor (PSL, GMT->current.setting.map_frame_pen.rgb, PSL_IS_STROKE);
1374
1375 fat_pen = gmtplot_fancy_fat_pen_width (GMT);
1376 if (GMT->current.map.frame.axis[GMT_Y].item[GMT_TICK_LOWER].active) { /* Need two-layer frame */
1377 fat_pen *= 0.5;
1378 dual = true;
1379 }
1380 thin_pen = gmtplot_fancy_thin_pen_width (GMT, fat_pen);
1381
1382 /* Draw frame checkers */
1383 /* This needs to be done with BUTT cap since checker segments are drawn as heavy lines */
1384
1385 PSL_setlinewidth (PSL, fat_pen);
1386 PSL_setlinecap (PSL, PSL_BUTT_CAP);
1387
1388 gmtplot_fancy_frame_straightlat_checkers (GMT, PSL, w, e, s, n, dual);
1389 gmtplot_fancy_frame_straightlon_checkers (GMT, PSL, w, e, s, n, dual);
1390
1391 /* Draw the outline on top of the checkers */
1392 /* Reset line cap, etc. */
1393
1394 PSL_setlinecap (PSL, cap);
1395 PSL_setcolor (PSL, GMT->current.setting.map_frame_pen.rgb, PSL_IS_STROKE);
1396 PSL_setlinewidth (PSL, thin_pen);
1397
1398 gmtplot_fancy_frame_straight_outline (GMT, PSL, w, s, e, s, S_SIDE, dual);
1399 gmtplot_fancy_frame_straight_outline (GMT, PSL, e, s, e, n, E_SIDE, dual);
1400 gmtplot_fancy_frame_straight_outline (GMT, PSL, e, n, w, n, N_SIDE, dual);
1401 gmtplot_fancy_frame_straight_outline (GMT, PSL, w, n, w, s, W_SIDE, dual);
1402
1403 gmtplot_rounded_framecorners (GMT, PSL, w, e, s, n, dual);
1404}
1405
1406GMT_LOCAL void gmtplot_rect_map_boundary (struct GMT_CTRL *GMT, struct PSL_CTRL *PSL, double x0, double y0, double x1, double y1) {
1407 unsigned int cap = PSL->internal.line_cap;

Callers 1

gmtplot_map_boundaryFunction · 0.85

Tested by

no test coverage detected