diff --git a/Project.toml b/Project.toml index be96b02..3bafdc3 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ authors = ["Anshul Singhvi"] name = "MakieTeX" uuid = "6d554a22-29e7-47bd-aee5-0c5f06619414" -version = "0.0.3" +version = "0.0.4" [deps] Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" @@ -12,9 +12,9 @@ LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" Rsvg = "c4c386cf-5103-5370-be45-f3a111cca3b8" [compat] -Makie = "0.13" +Makie = "0.13, 0.14" Cairo = "1.0.4" -CairoMakie = "0.5" +CairoMakie = "0.5.5, 0.6" Colors = "0.9, 0.10, 0.11, 0.12" LaTeXStrings = "1.2" Rsvg = "1" diff --git a/src/recipe.jl b/src/recipe.jl index 140cfcb..b59d8b8 100644 --- a/src/recipe.jl +++ b/src/recipe.jl @@ -85,7 +85,7 @@ function get_ink_extents(surf::CairoSurface) dims = zeros(Float64, 4) ccall( - (:cairo_recording_surface_ink_extents, CairoMakie.LIB_CAIRO), + (:cairo_recording_surface_ink_extents, CairoMakie.Cairo.libcairo), Cvoid, (Ptr{Cvoid}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}), surf.ptr, Ref(dims, 1), Ref(dims, 2), Ref(dims, 3), Ref(dims, 4) diff --git a/src/rendering.jl b/src/rendering.jl index e29afa5..cb89a43 100644 --- a/src/rendering.jl +++ b/src/rendering.jl @@ -89,7 +89,7 @@ function svg2img(svg::String, dpi = 72.0) # First, we instantiate an Rsvg handle, which holds a parsed representation of # the SVG. Then, we set its DPI to the provided DPI (usually, 300 is good). handle = Rsvg.handle_new_from_data(svg) - Rsvg.handle_set_dpi(handle, dpi) + Rsvg.handle_set_dpi(handle, Float64(dpi)) # We can find the final dimensions (in pixel units) of the Rsvg image. # Then, it's possible to store the image in a native Julia array, @@ -113,7 +113,7 @@ function svg2img(svg::String, dpi = 72.0) end function rsvg2img(handle::Rsvg.RsvgHandle, dpi = 72.0) - Rsvg.handle_set_dpi(handle, dpi) + Rsvg.handle_set_dpi(handle, Float64(dpi)) # We can find the final dimensions (in pixel units) of the Rsvg image. # Then, it's possible to store the image in a native Julia array, @@ -137,7 +137,7 @@ end function svg2rsvg(svg::String, dpi = 72.0) handle = Rsvg.handle_new_from_data(svg) - Rsvg.handle_set_dpi(handle, dpi) + Rsvg.handle_set_dpi(handle, Float64(dpi)) return handle end