Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ The following settings can be included in a `StarCharter` configuration file:
* `axis_ticks_value_only` - If 1, axis labels will appear as simply "5h" or "30 deg". If 0, these labels will be preceded by alpha= or delta=
* `az_central` - The local azimuth of the centre of the plot; degrees. This setting is only used if `coords=alt_az`.
* `cardinals` - Boolean (0 or 1) indicating whether to write the cardinal points around the edge of alt/az star charts
* `chart_edge_line_width` - Line width to use when marking the edge of the chart. Default 2.5.
- `chart_edge_line_col` - Colour to use when marking the edge of the chart. Default `0,0,0`.
- `chart_edge_line_width` - Line width to use when marking the edge of the chart. Default 2.5.
* `constellation_boundaries` - Boolean (0 or 1) indicating whether we draw constellation boundaries
* `constellation_boundary_col` - Colour to use when drawing constellation boundaries
* `constellation_highlight` - Optionally, highlight the boundary of one particular constellation, identified by a three-letter abbreviation.
Expand Down
1 change: 1 addition & 0 deletions src/settings/chart_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ void default_config(chart_config *i) {
i->constellations_label_shadow = 1;
i->constellation_sticks_line_width = 1.4;
i->chart_edge_line_width = 2.5;
i->chart_edge_line_col = (colour) {0, 0, 0};

// Boolean flags indicating which settings have been manually overridden
i->mag_min_is_set = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/settings/chart_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,9 @@ typedef struct chart_config {
//! Line width to use for the edge of the star chart
double chart_edge_line_width;

//! Colour to use for the edge of the star chart
colour chart_edge_line_col;

//! Boolean flags indicating which settings have been manually overridden
//! (so that automatic scaling does not overwrite them).
int mag_min_is_set;
Expand Down
4 changes: 4 additions & 0 deletions src/settings/read_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,10 @@ int process_configuration_file_line(char *line, const char *filename, const int
CHECK_VALUE_NUMERIC("chart_edge_line_width")
x->chart_edge_line_width = key_val_num;
return 0;
} else if (strcmp(key, "chart_edge_line_col") == 0) {
//! chart_edge_line_col - Colour to use when marking the edge of the chart.
x->chart_edge_line_col = colour_from_string(key_val);
return 0;
} else {
snprintf(temp_err_string, FNAME_LENGTH, "Bad input file. Unrecognised setting '%s'.", key);
stch_error(temp_err_string);
Expand Down
2 changes: 1 addition & 1 deletion src/vectorGraphics/cairo_page.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void draw_chart_edging(cairo_page *p, chart_config *s) {
cairo_show_text(s->cairo_draw, s->title);

// Draw outline of chart
cairo_set_source_rgb(s->cairo_draw, 0, 0, 0);
cairo_set_source_rgb(s->cairo_draw, s->chart_edge_line_col.red, s->chart_edge_line_col.grn, s->chart_edge_line_col.blu);
cairo_set_line_width(s->cairo_draw, s->chart_edge_line_width * s->line_width_base);
cairo_new_path(s->cairo_draw);
if ((s->projection == SW_PROJECTION_SPHERICAL) || (s->projection == SW_PROJECTION_ALTAZ)) {
Expand Down