Draw the constellations: faint lines between their stars, from
constellation file file (found with find_data_file; read when given,
or when first shown without one: default_constellations), shown
(default false), in color rgba (default a faint blue, alpha 0.45) and
width window units wide (default 1). Also while shown; the settings
not given are kept. Returns false if the file can't be read (the
constellations read before are kept) or width isn't > 0 (nothing
changed).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(SkySphere), | intent(inout) | :: | self | |||
| logical, | intent(in) | :: | shown |
draw the constellations |
||
| character(len=*), | intent(in), | optional | :: | file |
constellation file |
|
| real(kind=wp), | intent(in), | optional | :: | rgba(4) |
color [r, g, b, a] (0 to 1) |
|
| real(kind=wp), | intent(in), | optional | :: | width |
window units (> 0) |
logical function set_constellations(self, shown, file, rgba, width) result(ok) class(SkySphere), intent(inout) :: self logical, intent(in) :: shown !! draw the constellations character(len=*), intent(in), optional :: file !! constellation file real(wp), intent(in), optional :: rgba(4) !! color [r, g, b, a] (0 to 1) real(wp), intent(in), optional :: width !! window units (> 0) ok = .true. if (present(width)) ok = width > 0.0_wp if (.not. ok) return self%lines_shown = shown if (present(rgba)) self%lines_rgba = rgba if (present(width)) self%lines_width = width if (present(file)) then ok = read_constellations(self, file) else if (shown .and. .not. allocated(self%constellation_file)) then ok = read_constellations(self, default_constellations) end if if (c_associated(self%root)) call make_line_node(self) end function set_constellations