A <new article> on drawing text on a path in Compo...
# compose-desktop
k
A new article on drawing text on a path in Compose Desktop with Skia is out!
😃 4
K 23
o
Looks cool, will you create universal component to render text this way?
k
Not at the present moment, as it doesn't feel to fit into Aurora. https://github.com/kirill-grouchnikov/artemis/blob/woodland/src/main/kotlin/org/pushingpixels/artemis/DrawTextOnPath.kt is the whole thing, modulo the limitations in article / comments (RTL, converting text style to Skia font)
s
Cool work 👏
k
I wonder if a live animation of that text wiggling around could work? Like text descriptions following moving on-screen "assets?" 🤔
k
Do you have a link to the specific effect in mind? Like a video or maybe a website that is doing that?
k
No mate, just dreaming up use cases as we go! Just imagining a label following my model train items around on the screen for starters.
I used to do GIS, and curved labels following polylines was a great feature!
k
Certainly if you already have a
Path
that is being updated as part of that animation, you can use this feature to have the text follow that path. I have not done any performance benchmarks of this code to tell you how many of these you can fit within a single frame time budget though.
😎 1
k
Would actually also be cool to have like a serial data output stream pouring out from the mouse cursor for debugging as you go!
Goodoh! Yes, it would have a cost.
t
Interesting 👍
k
I'll say! So I guess it would be possible to use this style of thing to place symbols along the line too. Perhaps at set spacings, and even perpendicular, to create interesting drawing annotations, embellishments.