androdlang / TFTShape

2D graphics library for ESP8266/ESP32
MIT License
68 stars 14 forks source link

[Feature Request] Line thickness #1

Closed ImpulseAdventure closed 5 years ago

ImpulseAdventure commented 5 years ago

Excellent job with the library!

From what I have seen, the library currently builds upon single-pixel width line primitives. For future consideration, I'm wondering if you think it might be useful / feasible to consider support for configurable line thickness? Not sure what an optimum algorithm might be; as a hack I wondered if it could be emulated by filled polys...

thanks

androdlang commented 5 years ago

Thank you for the comment, yes, line thickness was an issue I thought about: it would be relatively easy to implement but: extending the low level line-drawing algo would happen on pixel basis and therefore slow. For me it's OK to use a filled rect with the desired thickness as height and on using this method you even have the possibility to outine the line i.e. with another color.