Skip to main content

halign_to_canvas

Function halign_to_canvas 

Source
pub fn halign_to_canvas(align: HAlign) -> &'static str
Expand description

Returns the Canvas2D textAlign property value for a given HAlign.

Maps plotkit’s horizontal alignment enum to the string values expected by CanvasRenderingContext2d.textAlign.