use windows::Win32::Graphics::DirectWrite::{
DWRITE_TEXT_ALIGNMENT, DWRITE_TEXT_ALIGNMENT_CENTER, DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_TEXT_ALIGNMENT_TRAILING,
};
use crate::text::TextAlignment;
impl From<TextAlignment> for DWRITE_TEXT_ALIGNMENT {
fn from(alignment: TextAlignment) -> Self {
match alignment {
TextAlignment::Left => DWRITE_TEXT_ALIGNMENT_LEADING,
TextAlignment::Center => DWRITE_TEXT_ALIGNMENT_CENTER,
TextAlignment::Right => DWRITE_TEXT_ALIGNMENT_TRAILING,
}
}
}