! . */
| 1777 | |
| 1778 | /*! . */ |
| 1779 | GMT_LOCAL double gmtplot_get_annot_offset (struct GMT_CTRL *GMT, bool *flip, unsigned int level) { |
| 1780 | /* Return offset in inches for text annotation. If annotation |
| 1781 | * is to be placed 'inside' the map, set flip to true */ |
| 1782 | |
| 1783 | double a = GMT->current.setting.map_annot_offset[level]; |
| 1784 | if (GMT->current.setting.map_frame_type & GMT_IS_INSIDE) { /* Inside annotation */ |
| 1785 | a = -fabs (a); |
| 1786 | a -= fabs (GMT->current.setting.map_tick_length[GMT_PRIMARY]); |
| 1787 | *flip = true; |
| 1788 | } |
| 1789 | else if (a >= 0.0) { /* Outside annotation */ |
| 1790 | double dist = GMT->current.setting.map_tick_length[GMT_PRIMARY]; /* Length of tickmark (could be negative) */ |
| 1791 | /* For fancy frame we must consider that the frame width might exceed the ticklength */ |
| 1792 | if (GMT->current.setting.map_frame_type & GMT_IS_FANCY && GMT->current.setting.map_frame_width > dist) dist = GMT->current.setting.map_frame_width; |
| 1793 | if (dist > 0.0) a += dist; |
| 1794 | *flip = false; |
| 1795 | } |
| 1796 | else { /* Inside annotation via negative tick length */ |
| 1797 | if (GMT->current.setting.map_tick_length[GMT_PRIMARY] < 0.0) a += GMT->current.setting.map_tick_length[GMT_PRIMARY]; |
| 1798 | *flip = true; |
| 1799 | } |
| 1800 | |
| 1801 | return (a); |
| 1802 | } |
| 1803 | |
| 1804 | GMT_LOCAL double gmtplot_curved_boundary_offset (struct GMT_CTRL *GMT, double lon, double lat, int type, unsigned int level) { |
| 1805 | /* For global curved maps like Mollweide etc, the parallel labeling occurs against an increasingly |
no outgoing calls
no test coverage detected