Closed baggepinnen closed 6 hours ago
This is a px_per_unit issue. Don't get it with the example above, but with record(..., px_per_unit = 2.0)
I encountered this issue on a M1 Mac Studio.
julia> versioninfo()
Julia Version 1.10.5
Commit 6f3fdf7b362 (2024-08-27 14:19 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 10 × Apple M1 Max
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
The first solution I found was to activate with a screen config setting px_per_unit
to 1
.
WGLMakie.activate!(; px_per_unit=1)
This works, but produces a lower quality figure display.
The next solution I found was to make Base.size
aware of px_per_unit
:
Base.size(screen::WGLMakie.Screen) = size(screen.scene) .* Int(screen.config.px_per_unit)
Hmm, that's an interesting question. Should size(screen)
mean number of physical pixels or number of logical pixels?
size(scene)
currently means logical pixels, and it should probably stay that way, but the contexts in which you would invoke a screen's size are probably all about output handling, so you might want physical pixels there?
size
is used here:
https://github.com/MakieOrg/Makie.jl/blob/e90c042d16b461e67b750e5ce53790e732281dba/src/ffmpeg-util.jl#L263
I suppose one could also do the mulitplication there.
_xdim, _ydim = size(screen) .* Int(screen.config.px_per_unit)
Just got this with the Lorenz attractor example on the Makie.jl home page using Pluto. Some students ran into it.
]activate --temp; add Makie
)When creating animations, I can use GLMakie or CairoMakie without problems, but with WGLMakie I get
This code appears sufficient to reproduce
The problem is
where
glnative
has the wrong size for WGLMakie