Replies: 2 comments 1 reply
-
You need to make sure that there's only a single reference to the surface. Yours will have one more from the context, and another one from |
Beta Was this translation helpful? Give feedback.
0 replies
-
the problem is, if I just call
rust compiler tell me that
and it seems that no other way to get image data from a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to get drawing result in cairo::Surface.
for example, I have tried the following
but rust compiler report panic message:
it panic at
let img_surface_data: cairo::ImageSurfaceData = img_surface.data().expect("why panic here?");
is the above approach to get data from a surface is wrong? and how to get image data from a surface(I am ok to copy data in to a Vec)?
Beta Was this translation helpful? Give feedback.
All reactions