This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-21
Channels
- # announcements (7)
- # babashka (16)
- # beginners (174)
- # biff (7)
- # calva (20)
- # cider (3)
- # clerk (6)
- # cljsrn (4)
- # clojure (98)
- # clojure-europe (57)
- # clojure-italy (3)
- # clojure-nl (1)
- # clojure-portugal (1)
- # clojure-spec (15)
- # clojure-uk (7)
- # code-reviews (3)
- # cursive (23)
- # data-science (1)
- # datomic (26)
- # dev-tooling (2)
- # emacs (5)
- # figwheel-main (4)
- # fulcro (3)
- # honeysql (20)
- # hyperfiddle (20)
- # malli (8)
- # membrane (31)
- # nextjournal (5)
- # pathom (1)
- # polylith (20)
- # re-frame (14)
- # reitit (8)
- # releases (2)
- # shadow-cljs (50)
- # specter (2)
- # sql (22)
- # xtdb (5)
@smith.adriane Quick question โ Iโm trying to color these rooms based on their state. Is the only way to set their background color to draw a rectangle around the element, which means I need to call bounds
on the room element (to get their width and height)?
Thx!
๐ , yep, that's right.
there's fill-bordered
oh, did you want a completely filled background or just a different outline for the border itself?
Umm, was thinking a filled background. If fill-bordered does that, that would be awesome, because I can just wrap the existing element. (Versus putting that element in a let block, computing the bounds, and then feeding that into rectangle
, if you get my driftโฆ)
yea, that's what fill-bordered
does.
although, fill-bordered
is just a convenience function that essentially does the following if you want to tweak it:
(defn fill-bordered-draw [this]
(let [{:keys [color drawable]} this
[width height] (child-bounds drawable)]
[(filled-rectangle color
width height)
drawable]))
Trying to run Gene's example on my Linux machine I again stumble across the godawful slowness I encountered in the past. Only on Linux and Skia ๐ฌ
I can't quite remember if we narrowed down the issue last time. > Only on Linux and Skia I don't suppose that means you tried it with the java2d backend (I don't think it will even work because the paragraph stuff). I can't remember if it was because painting was slow or because it wasn't repainting. I think it was because it wasn't repainting. Does clicking the animate button do anything? What about the keyboard commands ("j" and "k")?
And I found that default mouse move global is slightly wasteful, I can send a patch if you'd like
I'm always interested in improvements. If it changes behavior, then it might take some time to review, but if the change doesn't change the output, I can probably get to it pretty quick.
Was there any particular function eating a bunch of time? maybe glfwWaitEventsTimeout
?
or glfwSwapBuffers
?
> Doesn't do anything and the log messages are very slow to come
This is the result when you clicked the animate button? If so, that's pretty bizzare since it should be in a completely separate thread from the UI and shouldn't be block by any UI related activity.
Do you get the same result if you call animate-all-frames!
manually?
which distribution are you using?
I think I saw you've tried HumbleUI (which also relies on skia). I assume you haven't run into the same issue? Maybe I can try and see which things they're doing differently.