Hi I’ve noticed that when using canvas and trying the “new” paint spec with more than one paint the JVM crashes:
(canvas/draw-rect canvas (util/irect-ltrb l t r b) (ui/paint [{:stroke "ffffff"} {:fill "000000"}]))
Just two lines from the core dump:
# Problematic frame:
# C [libskija.dylib+0x308d2c] SkPaint::nothingToDraw() const+0x10
It works fine if I stick to a simple paint:
(canvas/draw-rect canvas (util/irect-ltrb l t r b) (ui/paint {:stroke "ffffff"}))
Is this a bug in Humble?Thanks!
I’m still playing around with the whiteboard example. I find myself implementing functionality in canvas like dragging widgets around. Is that the best way you think?
Depends. There’s also a draggable component, although I only used if for splits, so API might be lacking. Let me know if you need anything added to it
Yeah, canvas was not re-thought yet. It used Skia api more or less directly, so expects paint object, not spec. Here’s how to do it:
(ui/with-paint ctx [paint [{:stroke "ffffff"}
{:fill "000000"}]]
(canvas/draw-rect canvas (util/irect-ltrb l t r b) paint))I’ll update canvas namespace later, probably a good idea