glyph-brush icon indicating copy to clipboard operation
glyph-brush copied to clipboard

Improve api document of Section's screen_position

Open mikialex opened this issue 3 years ago • 1 comments

Accroding to doc: https://docs.rs/glyph_brush/0.7.2/glyph_brush/struct.Section.html#structfield.screen_position, screen position is in pixels from top-left. Defaults to (0, 0). But in fact it's only true when the layout config in section is horizon: left, vertical: top. This position is actually anchor the alignment center, not the "top-left" position.

mikialex avatar Aug 19 '21 11:08 mikialex

Yep good spot. It is explained a bit buried at https://docs.rs/glyph_brush/0.7.2/glyph_brush/enum.HorizontalAlign.html

This could definitely be clearer, we could say it's top-left for the default layout, see horizontal & vertical align docs. It could also be different for custom layouts.

alexheretic avatar Aug 19 '21 18:08 alexheretic