remove_artist Subroutine

private subroutine remove_artist(self, a)

Remove an artist (it stops being drawn; it can be added again, also to another frame).

Type Bound

DrawableTrajectory

Arguments

Type IntentOptional Attributes Name
class(DrawableTrajectory), intent(inout) :: self
class(TrajectoryArtist), intent(in), target :: a

the artist to remove


Calls

proc~~remove_artist~~CallsGraph proc~remove_artist DrawableTrajectory%remove_artist interface~vkf_node_delete vkf_node_delete proc~remove_artist->interface~vkf_node_delete interface~vkf_node_remove_child vkf_node_remove_child proc~remove_artist->interface~vkf_node_remove_child proc~artist_release TrajectoryArtist%artist_release proc~remove_artist->proc~artist_release proc~check_status check_status proc~remove_artist->proc~check_status

Called by

proc~~remove_artist~~CalledByGraph proc~remove_artist DrawableTrajectory%remove_artist proc~remove_all_artists DrawableTrajectory%remove_all_artists proc~remove_all_artists->proc~remove_artist

Source Code

    subroutine remove_artist(self, a)
        class(DrawableTrajectory), intent(inout) :: self
        class(TrajectoryArtist), intent(in), target :: a    !! the artist to remove
        integer :: k
        do k = 1, self%n_artists
            if (associated(self%artists(k)%p, a)) then
                if (c_associated(self%artists(k)%group)) then
                    call check_status(vkf_node_remove_child(self%contents_group, self%artists(k)%group), 'trajectory artists')
                    call vkf_node_delete(self%artists(k)%group)
                    call self%artists(k)%p%release()
                end if
                self%artists(k:self%n_artists-1) = self%artists(k+1:self%n_artists)
                self%n_artists = self%n_artists - 1
                return
            end if
        end do
    end subroutine remove_artist