PistonDevelopers / gfx_text

Draw text for gfx using freetype
http://docs.piston.rs/gfx_text/gfx_text/
MIT License
22 stars 12 forks source link

Add type aliases for arrays #1

Closed bvssvni closed 9 years ago

bvssvni commented 9 years ago

There are some use of arrays like [i32; 2] which could be explained better by adding a type alias.

Kagami commented 9 years ago

Strictly speaking you are right - tuple-like types are bad in public API in general. But things stored in gfx_text in arrays are: 4-component colors, two-dimensional positions, texture coordiants, matrixes. In my opinion they are too common and widespread so simple name of the parameter + array type is more than enough. What do you think?

Kagami commented 9 years ago

Closing because of no activity. Feel free to reopen with new thoughts related that issue.