I cannot find a way to directly access the data of an image surface (which is done via cairo_image_surface_get_data in Cairo). Is this somewhere hidden in Cairo.jl?
Otherwise. Here is my workaround/implementation:
function image_surface_get_data(surface::CairoSurface{T}) where {T}
Cairo.flush(surface)
return ccall(
(:cairo_image_surface_get_data, Cairo.libcairo),
Ptr{T},
(Ptr{Nothing},),
surface.ptr)
end
Hello Cairo-team,
I cannot find a way to directly access the data of an image surface (which is done via cairo_image_surface_get_data in Cairo). Is this somewhere hidden in Cairo.jl?
Otherwise. Here is my workaround/implementation: