Hi.
Does somebody know how I can generate a .png
file with a transparent background?
The docs here say that it should suffice to put background(0,0,0,0)
.
Using the MWE from Simple examples · Luxor
using Luxor
@png begin
background(0,0,0,0)
setopacity(0.85)
steps = 20
gap = 2
for (n, θ) in enumerate(range(0, step=2π/steps, length=steps))
sethue([Luxor.julia_green,
Luxor.julia_red,
Luxor.julia_purple,
Luxor.julia_blue][mod1(n, 4)])
sector(Point(0, 0), 50, 250 + 2n, θ, θ + 2π/steps - deg2rad(gap), action = :fill)
end
end
I only ever get a white background (my image viewer is set to show a checker pattern instead)
What am I doing wrong here?