OffScreenWindow is miss in gtk4, which one I could use to replace in gtk4 #1655
Replies: 1 comment
-
I suppose you could use a GtkWidgetPaintable, create a custom gtk::Snapshot, snapshot the paintable there (the following code can be used for inspiration https://gitlab.gnome.org/World/design/app-icon-preview/-/blob/master/src/widgets/project_previewer.rs?ref_type=heads#L117) and I guess you could take the gdk::Texture and draw it content on a cairo context. There might better/other ways, but I would recommend asking gtk developers about it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://gtk-rs.org/gtk3-rs/stable/latest/docs/gtk/struct.OffscreenWindow.html
I draw a widget to
OffscreenWindow
, then call.draw()
to draw the widget to a foreign cairo contextbut I found
OffScreenWindow
is miss in gtk4, so how to draw a widget to a foreign cairo context in gtk4?Beta Was this translation helpful? Give feedback.
All reactions