fortplot_ascii_text_elements Module

ASCII terminal plotting backend - Text Element Management

This module handles text element creation, storage, and coordinate conversion for ASCII canvas rendering.

Author: fortplot contributors



Subroutines

public subroutine add_text_element(text_elements, num_text_elements, x, y, text, current_r, current_g, current_b, x_min, x_max, y_min, y_max, plot_width, plot_height)

Create and store a text element on the ASCII canvas

Arguments

Type IntentOptional Attributes Name
type(text_element_t), intent(inout) :: text_elements(:)
integer, intent(inout) :: num_text_elements
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: y
character(len=*), intent(in) :: text
real(kind=wp), intent(in) :: current_r
real(kind=wp), intent(in) :: current_g
real(kind=wp), intent(in) :: current_b
real(kind=wp), intent(in) :: x_min
real(kind=wp), intent(in) :: x_max
real(kind=wp), intent(in) :: y_min
real(kind=wp), intent(in) :: y_max
integer, intent(in) :: plot_width
integer, intent(in) :: plot_height

public subroutine store_text_element(text_elements, num_text_elements, text_x, text_y, processed_text, x, y, text, x_min, x_max, y_min, y_max, plot_width, plot_height, current_r, current_g, current_b)

Store a pre-processed text element for later ASCII rendering

Arguments

Type IntentOptional Attributes Name
type(text_element_t), intent(inout) :: text_elements(:)
integer, intent(inout) :: num_text_elements
integer, intent(out) :: text_x
integer, intent(out) :: text_y
character(len=:), intent(out), allocatable :: processed_text
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: y
character(len=*), intent(in) :: text
real(kind=wp), intent(in) :: x_min
real(kind=wp), intent(in) :: x_max
real(kind=wp), intent(in) :: y_min
real(kind=wp), intent(in) :: y_max
integer, intent(in) :: plot_width
integer, intent(in) :: plot_height
real(kind=wp), intent(in) :: current_r
real(kind=wp), intent(in) :: current_g
real(kind=wp), intent(in) :: current_b