fortplot_png Module



Derived Types

type, public, extends(raster_context) ::  png_context

Components

Type Visibility Attributes Name Initial
integer, public :: width
integer, public :: height
real(kind=wp), public :: x_min
real(kind=wp), public :: x_max
real(kind=wp), public :: y_min
real(kind=wp), public :: y_max
logical, public :: has_rendered_arrows = .false.
logical, public :: uses_vector_arrows = .false.
logical, public :: has_triangular_arrows = .false.
type(raster_image_t), public :: raster
type(plot_margins_t), public :: margins
type(plot_area_t), public :: plot_area

Type-Bound Procedures

procedure, public :: line => raster_draw_line
procedure, public :: color => raster_set_color_context
procedure, public :: text => raster_draw_text
procedure, public :: set_line_width => raster_set_line_width
procedure, public :: set_line_style => raster_set_line_style_context
procedure, public :: draw_marker => raster_draw_marker
procedure, public :: set_marker_colors => raster_set_marker_colors
procedure, public :: set_marker_colors_with_alpha => raster_set_marker_colors_with_alpha
procedure, public :: fill_quad => raster_fill_quad
procedure, public :: draw_arrow => raster_draw_arrow
procedure, public :: get_ascii_output => raster_get_ascii_output

New polymorphic methods to eliminate SELECT TYPE

procedure, public :: get_width_scale => raster_get_width_scale
procedure, public :: get_height_scale => raster_get_height_scale
procedure, public :: fill_heatmap => raster_fill_heatmap
procedure, public :: render_legend_specialized => raster_render_legend_specialized
procedure, public :: calculate_legend_dimensions => raster_calculate_legend_dimensions
procedure, public :: set_legend_border_width => raster_set_legend_border_width
procedure, public :: calculate_legend_position_backend => raster_calculate_legend_position
procedure, public :: extract_rgb_data => raster_extract_rgb_data
procedure, public :: prepare_3d_data => raster_prepare_3d_data
procedure, public :: render_ylabel => raster_render_ylabel
procedure, public :: draw_axes_and_labels_backend => raster_draw_axes_and_labels
procedure, public :: save_coordinates => raster_save_coordinates
procedure, public :: set_coordinates => raster_set_coordinates
procedure, public :: render_axes => raster_render_axes
procedure, public :: save => png_finalize
procedure, public :: get_png_data_backend => png_get_png_data

Functions

public function create_png_canvas(width, height) result(ctx)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: width
integer, intent(in) :: height

Return Value type(png_context)


Subroutines

public subroutine write_png_file(filename, width, height, image_data)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
integer, intent(in) :: width
integer, intent(in) :: height
integer(kind=1), intent(in) :: image_data(:)

public subroutine get_png_data(width, height, image_data, png_buffer)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: width
integer, intent(in) :: height
integer(kind=1), intent(in) :: image_data(:)
integer(kind=1), intent(out), allocatable :: png_buffer(:)