ASCII terminal plotting backend - Utility Functions
This module contains utility functions used by the ASCII plotting backend,
including character manipulation, text rendering, and output formatting.
Author: fortplot contributors
          
      
      
        
          Variables
            
    
      
        | Type | Visibility | Attributes |  | Name |  | Initial |  | 
    
        
            | character(len=*), | public, | parameter | :: | ASCII_CHARS | = | ' .:-=+*#%@' |  | 
    
  
        
        
        
          Derived Types
              
    
    
      
        Components
          
    
      
        | Type | Visibility | Attributes |  | Name |  | Initial |  | 
    
        
            | character(len=:), | public, | allocatable | :: | text |  |  |  | 
        
            | integer, | public |  | :: | x |  |  |  | 
        
            | integer, | public |  | :: | y |  |  |  | 
        
            | real(kind=wp), | public |  | :: | color_r |  |  |  | 
        
            | real(kind=wp), | public |  | :: | color_g |  |  |  | 
        
            | real(kind=wp), | public |  | :: | color_b |  |  |  | 
    
  
     
   
        
        
        
          Functions
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | character(len=1), | intent(in) |  |  | :: | char |  | 
    
  
    
    Return Value
    integer
    
    
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | character(len=1), | intent(in) |  |  | :: | char1 |  | 
        
            | character(len=1), | intent(in) |  |  | :: | char2 |  | 
    
  
    
    Return Value
    character(len=1)
    
    
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | character(len=*), | intent(in) |  |  | :: | text |  | 
    
  
    
    Return Value
    logical
    
    
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | character(len=64), | intent(in) |  |  | :: | legend_entry_labels(:) |  | 
        
            | integer, | intent(in) |  |  | :: | legend_entry_count |  | 
        
            | character(len=*), | intent(in) |  |  | :: | text |  | 
    
  
    
    Return Value
    logical
    
    
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | character(len=*), | intent(in) |  |  | :: | text |  | 
    
  
    
    Return Value
    logical
    
    
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | character(len=*), | intent(in) |  |  | :: | marker_style |  | 
    
  
    
    Return Value
    character(len=1)
    
    
     
   
        
        
        
          Subroutines
              
    
    
          
  Render stored text elements onto the ASCII canvas with Unicode-to-ASCII conversion
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | character(len=1), | intent(inout) |  |  | :: | canvas(:,:) |  | 
        
            | type(text_element_t), | intent(in) |  |  | :: | text_elements(:) |  | 
        
            | integer, | intent(in) |  |  | :: | num_text_elements |  | 
        
            | integer, | intent(in) |  |  | :: | plot_width |  | 
        
            | integer, | intent(in) |  |  | :: | plot_height |  | 
    
  
     
   
              
    
    
          
  Print centered title to terminal with Unicode-to-ASCII conversion
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | character(len=*), | intent(in) |  |  | :: | title |  | 
        
            | integer, | intent(in) |  |  | :: | width |  | 
    
  
     
   
              
    
    
          
  Write centered title to file with Unicode-to-ASCII conversion
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | integer, | intent(in) |  |  | :: | unit |  | 
        
            | character(len=*), | intent(in) |  |  | :: | title |  | 
        
            | integer, | intent(in) |  |  | :: | width |  |