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

Function gmtplot_conic_map_boundary

src/gmt_plot.c:1505–1556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1503/* CONIC PROJECTION MAP BOUNDARY */
1504
1505GMT_LOCAL void gmtplot_conic_map_boundary (struct GMT_CTRL *GMT, struct PSL_CTRL *PSL, double w, double e, double s, double n) {
1506 bool dual = false;
1507 unsigned int cap = PSL->internal.line_cap;
1508 double thin_pen, fat_pen;
1509
1510 if (GMT->common.R.oblique) { /* Draw rectangular boundary and return */
1511 gmtplot_rect_map_boundary (GMT, PSL, 0.0, 0.0, GMT->current.proj.rect[XHI], GMT->current.proj.rect[YHI]);
1512 return;
1513 }
1514
1515 if (!(GMT->current.setting.map_frame_type & GMT_IS_FANCY)) { /* Draw plain boundary and return */
1516 gmtplot_wesn_map_boundary (GMT, PSL, w, e, s, n);
1517 return;
1518 }
1519
1520 /* Here draw fancy map boundary */
1521
1522 if (!GMT->current.proj.north_pole && gmt_M_is_Spole (s)) /* Cannot have southern boundary */
1523 GMT->current.map.frame.side[S_SIDE] = GMT_AXIS_NONE;
1524 if (GMT->current.proj.north_pole && gmt_M_is_Npole (n)) /* Cannot have northern boundary */
1525 GMT->current.map.frame.side[N_SIDE] = GMT_AXIS_NONE;
1526
1527 fat_pen = gmtplot_fancy_fat_pen_width (GMT);
1528 if (GMT->current.map.frame.axis[GMT_Y].item[GMT_TICK_LOWER].active) { /* Need two-layer frame */
1529 fat_pen *= 0.5;
1530 dual = true;
1531 }
1532 thin_pen = gmtplot_fancy_thin_pen_width (GMT, fat_pen);
1533
1534 /* Draw frame checkers */
1535 /* This needs to be done with BUTT cap since checker segments are drawn as heavy lines */
1536
1537 PSL_setlinewidth (PSL, fat_pen);
1538 PSL_setlinecap (PSL, PSL_BUTT_CAP);
1539
1540 gmtplot_fancy_frame_straightlat_checkers (GMT, PSL, w, e, s, n, dual);
1541 gmtplot_fancy_frame_curvedlon_checkers (GMT, PSL, w, e, s, n, dual);
1542
1543 /* Draw the outline on top of the checkers */
1544 /* Reset line cap, etc. */
1545
1546 PSL_setlinecap (PSL, cap);
1547 PSL_setcolor (PSL, GMT->current.setting.map_frame_pen.rgb, PSL_IS_STROKE);
1548 PSL_setlinewidth (PSL, thin_pen);
1549
1550 gmtplot_fancy_frame_curved_outline (GMT, PSL, w, s, e, s, S_SIDE, dual);
1551 gmtplot_fancy_frame_straight_outline (GMT, PSL, e, s, e, n, E_SIDE, dual);
1552 gmtplot_fancy_frame_curved_outline (GMT, PSL, w, n, e, n, N_SIDE, dual);
1553 gmtplot_fancy_frame_straight_outline (GMT, PSL, w, n, w, s, W_SIDE, dual);
1554
1555 gmtplot_rounded_framecorners (GMT, PSL, w, e, s, n, dual);
1556}
1557
1558/* OBLIQUE MERCATOR PROJECTION MAP FUNCTIONS */
1559

Callers 1

gmtplot_map_boundaryFunction · 0.85

Tested by

no test coverage detected