fortplot_figure_core_compat Module

Figure backward compatibility and animation support module

This module contains backward compatibility and animation methods extracted from fortplot_figure_core for architectural compliance

ARCHITECTURAL REFACTORING (Issue #678): - Focused module for backward compatibility operations - Single Responsibility Principle compliance - Clean separation from core plotting functionality



Functions

public function get_width_figure(state) result(width)

Get figure width

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value integer

public function get_height_figure(state) result(height)

Get figure height

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value integer

public function get_rendered_figure(state) result(rendered)

Get rendered state

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value logical

public function get_plot_count_figure(state) result(plot_count)

Get number of plots

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value integer

public function backend_associated_figure(state) result(is_associated)

Check if backend is allocated

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value logical

public function get_x_min_figure(state) result(x_min)

Get x minimum value

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value real(kind=wp)

public function get_x_max_figure(state) result(x_max)

Get x maximum value

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value real(kind=wp)

public function get_y_min_figure(state) result(y_min)

Get y minimum value

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value real(kind=wp)

public function get_y_max_figure(state) result(y_max)

Get y maximum value

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value real(kind=wp)


Subroutines

public subroutine set_rendered_figure(state, rendered)

Set rendered state

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
logical, intent(in) :: rendered

public subroutine setup_png_backend_for_animation_figure(state)

Setup PNG backend for animation (temporary method)

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state

public subroutine extract_rgb_data_for_animation_figure(state, plots, plot_count, rgb_data)

Extract RGB data for animation

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
type(plot_data_t), intent(inout) :: plots(:)
integer, intent(in) :: plot_count
real(kind=wp), intent(out) :: rgb_data(:,:,:)

public subroutine extract_png_data_for_animation_figure(state, plots, plot_count, png_data, status)

Extract PNG data for animation

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
type(plot_data_t), intent(inout) :: plots(:)
integer, intent(in) :: plot_count
integer(kind=1), intent(out), allocatable :: png_data(:)
integer, intent(out) :: status

public subroutine backend_color_figure(state, r, g, b)

Set backend color

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
real(kind=wp), intent(in) :: r
real(kind=wp), intent(in) :: g
real(kind=wp), intent(in) :: b

public subroutine backend_line_figure(state, x1, y1, x2, y2)

Draw line using backend

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
real(kind=wp), intent(in) :: x1
real(kind=wp), intent(in) :: y1
real(kind=wp), intent(in) :: x2
real(kind=wp), intent(in) :: y2