set_color Subroutine

private subroutine set_color(self, color)

[r, g, b] (alpha unchanged) or [r, g, b, a], 0 to 1.

Type Bound

HUDText

Arguments

Type IntentOptional Attributes Name
class(HUDText), intent(inout) :: self
real(kind=wp), intent(in) :: color(:)

[r, g, b] or [r, g, b, a] (0 to 1)


Called by

proc~~set_color~~CalledByGraph proc~set_color HUDText%set_color proc~new_hud_text new_hud_text proc~new_hud_text->proc~set_color interface~hudtext HUDText interface~hudtext->proc~new_hud_text

Source Code

    subroutine set_color(self, color)
        class(HUDText), intent(inout) :: self
        real(wp), intent(in) :: color(:)        !! [r, g, b] or [r, g, b, a] (0 to 1)
        integer :: n
        n = min(4, ubound(color, 1))
        self%color_(1:n) = color(1:n)
        self%revision_ = self%revision_ + 1
    end subroutine set_color