Line pattern and style rendering algorithms
This module contains line style pattern rendering and segment drawing algorithms following the Single Responsibility Principle.
SOLID: Single responsibility for line style implementation
Calculate total length of pattern cycle Following KISS principle - simple sum calculation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | pattern(20) | |||
integer, | intent(in) | :: | pattern_size |
Determine if line should be drawn at given distance in pattern Following SRP - handles only pattern position logic
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | distance | |||
real(kind=wp), | intent(in) | :: | pattern(20) | |||
integer, | intent(in) | :: | pattern_size | |||
real(kind=wp), | intent(in) | :: | pattern_length |
Get line pattern array for given style Following DRY principle - centralized pattern definitions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | linestyle | |||
real(kind=wp), | intent(out) | :: | pattern(20) | |||
integer, | intent(out) | :: | pattern_size |
Advance pattern state for continuous rendering Following SRP - handles only state advancement
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | current_distance | |||
real(kind=wp), | intent(in) | :: | segment_length | |||
real(kind=wp), | intent(in) | :: | pattern(20) | |||
integer, | intent(in) | :: | pattern_size | |||
real(kind=wp), | intent(in) | :: | pattern_length | |||
real(kind=wp), | intent(out) | :: | new_distance |