The horizontal and vertical alignments of vsg::StandardLayout for an ALIGN_* constant (vkf_frames: 0 left-top ... 8 right-bottom, 9 to 11 base line).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | alignment |
an ALIGN_* constant of vkf_frames |
||
| integer, | intent(out) | :: | h |
VSG_* horizontal and vertical alignments |
||
| integer, | intent(out) | :: | v |
VSG_* horizontal and vertical alignments |
pure subroutine vsg_alignment(alignment, h, v) integer, intent(in) :: alignment !! an ALIGN_* constant of vkf_frames integer, intent(out) :: h, v !! VSG_* horizontal and vertical alignments integer, parameter :: horizontal(0:11) = [VSG_LEFT, VSG_LEFT, VSG_LEFT, VSG_CENTER, VSG_CENTER, VSG_CENTER, & VSG_RIGHT, VSG_RIGHT, VSG_RIGHT, VSG_LEFT, VSG_CENTER, VSG_RIGHT] integer, parameter :: vertical(0:11) = [VSG_TOP, VSG_CENTER, VSG_BOTTOM, VSG_TOP, VSG_CENTER, VSG_BOTTOM, & VSG_TOP, VSG_CENTER, VSG_BOTTOM, VSG_BASELINE, VSG_BASELINE, VSG_BASELINE] integer :: a a = max(0, min(11, alignment)) h = horizontal(a) v = vertical(a) end subroutine vsg_alignment