yupferris / wisegui

Throwing around ideas for a possible immediate mode GUI lib for simple debuggers etc..
6 stars 2 forks source link

Added simple line drawing. #2

Open mattbettcher opened 6 years ago

mattbettcher commented 6 years ago

Normal line rendering can come in real handy in an gui so I added a simple line drawing algorithm. Most of the changes elsewhere come from me running rustfmt and not realizing it until later. I did a quick test to ensure the line draws in all directions without failure. It can however draw outside the buffer if coordinates are passed outside the buffer (it can't actually because Rust!)

Anyway, give it a look and let me know what you think. I'm passing tuples as coordinates, not sure if I like that. And I clipping to the buffer space is needed.