Skip to content

Commit

Permalink
Merge pull request #19 from ffreyer/update
Browse files Browse the repository at this point in the history
update to new CairoMakie version, fix lib cairo path
  • Loading branch information
jkrumbiegel authored Jun 14, 2021
2 parents c93c3e0 + 2019f67 commit 86c250f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/recipe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/rendering.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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

Expand Down

2 comments on commit 86c250f

@jkrumbiegel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/38816

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.0.4 -m "<description of version>" 86c250fa286b9db38aed93fc22cd94ec8466b953
git push origin v0.0.4

Please sign in to comment.