Any way to set the line width for drawRect on C-API?

Hi all,

Is there currently any way to set the line width for drawRect on the C-API? The Lua docs mention a setLineWidth function, which isn't in the C-API, and neither does the drawRect function take in a line width, like drawEllipse does.

I did find this thread from March saying there should be an update to add lineWidth to drawRect, but I don't see that in the latest SDK.

Is there something I'm missing? If not, what's the best work around here? Write a new drawRect that draws directly to the frame buffer?

Thanks!

This just slipped through the cracks. Thanks for catching it! :sweat_smile:

The function that the C API calls is down in the low-level graphics code, and oddly the Lua version has its own version that does four drawLine() calls to draw the rect. That also handles stroke position (though not line cap, which is a bug) so I guess it makes some sense it has a different implementation.

Okay, I've actually filed it this time, hopefully I'll be able to fix that soon.

1 Like

Thank you very much @dave!

1 Like