Core raster image management and basic operations Extracted from fortplot_raster.f90 for size reduction (SRP compliance)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=1), | public, | allocatable | :: | image_data(:) | |||
| integer, | public | :: | width | ||||
| integer, | public | :: | height | ||||
| real(kind=wp), | public | :: | dpi | = | REFERENCE_DPI | ||
| real(kind=wp), | public | :: | current_r | = | 0.0_wp | ||
| real(kind=wp), | public | :: | current_g | = | 0.0_wp | ||
| real(kind=wp), | public | :: | current_b | = | 0.0_wp | ||
| real(kind=wp), | public | :: | current_line_width | = | 1.0_wp | ||
| character(len=10), | public | :: | line_style | = | '-' | ||
| real(kind=wp), | public | :: | line_pattern(20) | ||||
| integer, | public | :: | pattern_size | = | 1 | ||
| real(kind=wp), | public | :: | pattern_length | = | SOLID_LINE_PATTERN_LENGTH | ||
| real(kind=wp), | public | :: | pattern_distance | = | 0.0_wp | ||
| real(kind=wp), | public | :: | marker_edge_r | = | 0.0_wp | ||
| real(kind=wp), | public | :: | marker_edge_g | = | 0.0_wp | ||
| real(kind=wp), | public | :: | marker_edge_b | = | 0.0_wp | ||
| real(kind=wp), | public | :: | marker_edge_alpha | = | 1.0_wp | ||
| real(kind=wp), | public | :: | marker_face_r | = | 1.0_wp | ||
| real(kind=wp), | public | :: | marker_face_g | = | 0.0_wp | ||
| real(kind=wp), | public | :: | marker_face_b | = | 0.0_wp | ||
| real(kind=wp), | public | :: | marker_face_alpha | = | 1.0_wp | ||
| real(kind=wp), | public | :: | config_title_font_size | = | -1.0_wp | ||
| real(kind=wp), | public | :: | config_label_font_size | = | -1.0_wp | ||
| real(kind=wp), | public | :: | config_tick_font_size | = | -1.0_wp | ||
| real(kind=wp), | public, | allocatable | :: | config_xtick_values(:) | |||
| real(kind=wp), | public, | allocatable | :: | config_ytick_values(:) | |||
| integer, | public | :: | last_y_tick_max_width | = | 0 | ||
| integer, | public | :: | last_y_tick_max_width_right | = | 0 | ||
| integer, | public | :: | last_x_tick_max_height_top | = | 0 | ||
| integer, | public | :: | last_x_tick_max_height_bottom | = | 0 |
| procedure, public :: set_color => raster_set_color | |
| procedure, public :: get_color_bytes => raster_get_color_bytes | |
| procedure, public :: set_line_style => raster_set_line_style |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | width | |||
| integer, | intent(in) | :: | height | |||
| real(kind=wp), | intent(in), | optional | :: | dpi |
Scale a pixel value from reference DPI (100) to target DPI. At REFERENCE_DPI the value is unchanged.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | px | |||
| real(kind=wp), | intent(in) | :: | dpi |
Convert points (1/72 inch) to pixels at given DPI.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | pt | |||
| real(kind=wp), | intent(in) | :: | dpi |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(raster_image_t), | intent(inout) | :: | image |