Open xucs007 opened 1 year ago
I don't think dlangui features such a thing. I'm gonna have a closer look, but I don't think there's a solution out of hte box. Just to clarify, do you want a Widget (eg TextWidget
) to draw vertically, or do you want a canvas to be able to draw vertical text?
Either way is fine. If you think TextWidget is easier to implement, just do it first.
In fact, C# WPF has a "transform" function, which can be applied to many widgets. But I guess that's more complicated to implement.
I'm going to give this an enchancement label and I'll think about how to implement this. If you have ideas - I"ll be more than glad to accept a PR :)
Maybe the 2 draw() functions in graphics/fonts.d, can be added with a "direction" parameter, but I still don't know how to realize.
I have investigated a bit. TextWidget
uses DrawBuf
anyway, so I think both should be updated at the same time. No idea when though
If I draw a square MCU pad, with pins on 4 sides. Some pins I might want to label horizontally, others vertically. What's the best way to rotate text?