Legend state and factory functions
Single Responsibility: Legend type definitions and factory functions
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | LEGEND_UPPER_LEFT | = | 1 | |
| integer, | public, | parameter | :: | LEGEND_UPPER_RIGHT | = | 2 | |
| integer, | public, | parameter | :: | LEGEND_LOWER_LEFT | = | 3 | |
| integer, | public, | parameter | :: | LEGEND_LOWER_RIGHT | = | 4 | |
| integer, | public, | parameter | :: | LEGEND_EAST | = | 5 |
Single Responsibility: Represents one legend entry
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=:), | public, | allocatable | :: | label | |||
| real(kind=wp), | public, | dimension(3) | :: | color | = | [0.0_wp, 0.0_wp, 0.0_wp] | |
| character(len=:), | public, | allocatable | :: | linestyle | |||
| character(len=:), | public, | allocatable | :: | marker |
Single Responsibility: Legend layout and rendering coordination
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(legend_entry_t), | public, | allocatable | :: | entries(:) | |||
| integer, | public | :: | position | = | LEGEND_UPPER_RIGHT | ||
| integer, | public | :: | num_entries | = | 0 | ||
| real(kind=wp), | public | :: | x_offset | = | 10.0_wp | ||
| real(kind=wp), | public | :: | y_offset | = | 10.0_wp | ||
| real(kind=wp), | public | :: | entry_height | = | 20.0_wp | ||
| real(kind=wp), | public | :: | line_length | = | 30.0_wp | ||
| real(kind=wp), | public | :: | text_padding | = | 10.0_wp |
| procedure, public :: add_entry => legend_add_entry | |
| procedure, public :: set_position => legend_set_position | |
| procedure, public :: clear => legend_clear |