Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cairo marker with sizes < 1 #4882

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Fix Cairo marker with sizes < 1 #4882

wants to merge 7 commits into from

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Mar 20, 2025

Description

Attempt to fix #4768 and fix #4881 without bringing back the issue from #4663.

Reproducer for #4663:

q = Quaternionf(0.6849482f0, 0.175505f0, 0.15756221f0, 0.6893606f0)
f,a,p = scatter(Point3f(0), rotation=q, markersize=20, marker=Makie.logo())
scatter!(
    1:10, 1:10, rand(10, 10) .* 10,
    rotation=normalize.(rand(Quaternionf, 10 * 10)),
    markersize=20,
)
f

This produces Float32[17.774902 -0.46377563; -9.153168 0.24081421] as the marker transformation matrix. Viewing this as a basis transformation gives two basis vectors that are very close to linearly dependent:

julia> M[:, 1] ./ norm(M[:, 1])
2-element Vector{Float32}:
  0.88904786
 -0.4578143

julia> M[:, 2] ./ norm(M[:, 2])
2-element Vector{Float32}:
 -0.88749003
  0.46082675

I believe that's the issue for Cairo.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Added an entry in CHANGELOG.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added unit tests for new algorithms, conversion methods, etc.
  • Added reference image tests for new plotting functions, recipes, visual options, etc.

@ffreyer ffreyer changed the title replace det check with basis check Fix Cairo marker with sizes < 1 Mar 20, 2025
@MakieBot
Copy link
Collaborator

MakieBot commented Mar 20, 2025

Benchmark Results

SHA: 20ca95d12b5ca2a3230bf01383540fd52b948393

Warning

These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking.

GLMakie
CairoMakie
WGLMakie

@ffreyer ffreyer marked this pull request as ready for review March 20, 2025 21:42
@ffreyer
Copy link
Collaborator Author

ffreyer commented Mar 21, 2025

Subpixel rendering is quite different between Cairo and GL backends but I think that's expected. I would mainly view the new test as an alarm that something changed anyway.

image

The two issues are fixed in this pr and the issue from #4663 hasn't reappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready to review
2 participants