Table of contents
Namespace: Com\Tecnick\Pdf
enum TextVAlign: string
Source: src/TextVAlign.php:36
Backed enum for the vertical alignment of text inside a cell: T (top), C (center), B (bottom), A (center on font ascent), L (center on font baseline) or D (center on font descent).
Cases
Top = 'T': Align to the top edge of the cell.Center = 'C': Align to the vertical center of the cell.Bottom = 'B': Align to the bottom edge of the cell.Ascent = 'A': Center on the font ascent line.Baseline = 'L': Center on the font baseline.Descent = 'D': Center on the font descent line.
Methods
fromLoose()
Resolve a loose vertical alignment value to the matching enum case.
Accepts T, C, B, A, L or D (case-insensitive, surrounding whitespace trimmed) or an enum instance (returned unchanged). Unknown values fall back to Center, matching the cell vertical alignment default.
public static fromLoose(string|self $value): self
Parameters:
$value(string|self): Vertical alignment or enum case.
Returns: self
Source: src/TextVAlign.php:65