Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve api document of Section's screen_position #142

Open
mikialex opened this issue Aug 19, 2021 · 1 comment
Open

Improve api document of Section's screen_position #142

mikialex opened this issue Aug 19, 2021 · 1 comment

Comments

@mikialex
Copy link

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.

@alexheretic
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants