Skip to content
Discussion options

You must be logged in to vote

Ahh, now I can run it. Thanks.

Regarding the size: Oops, you're right :-)

Looking at your code now, I think what I'd do is this:

Keep your background map as it is, in a scrollview indeed. Put that into a slint::Image once, make it the background, then don't ever touch it again :-). For each drawable that you have, besides the Drawable also have a slint::Image that contains the rendering of it. You could squeeze your Vec<Drawable> into slint::VecModel. Then create a slint::MapModel that maps your Rust Drawable struct to a struct that you declare in .slint: export struct OverlayDrawable { x: length, y: length, data: image}, and expose that MapModel to slint. Then in Slint you can write som…

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
12 replies
@leirn
Comment options

@tronical
Comment options

@leirn
Comment options

@tronical
Comment options

Answer selected by leirn
@leirn
Comment options

@leirn
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants