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

CairoMakie does not respect the alpha attribute in poly #4614

Open
3 tasks
asinghvi17 opened this issue Nov 21, 2024 · 4 comments
Open
3 tasks

CairoMakie does not respect the alpha attribute in poly #4614

asinghvi17 opened this issue Nov 21, 2024 · 4 comments
Assignees
Labels
bug CairoMakie This relates to CairoMakie, the vector backend for Makie based on Cairo.

Comments

@asinghvi17
Copy link
Member

  • what version of Makie are you running? (]st -m Makie) master
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie) yes
  • What platform + GPU are you on? irrelevant

MWE:

f, a, p = poly(Rect2f(Vec2f(0), Vec2f(1)); color = :gray, alpha = 0.5)
a.title = "Alpha by direct kwarg"

a2, p2 = poly(f[1, 2], Rect2f(Vec2f(0), Vec2f(1)); color = (:gray, 0.5))
a2.title = "Alpha in color"

f

Image

This is likely an issue only in CairoMakie, since GLMakie works.

@asinghvi17 asinghvi17 added bug CairoMakie This relates to CairoMakie, the vector backend for Makie based on Cairo. labels Nov 21, 2024
@asinghvi17 asinghvi17 self-assigned this Nov 21, 2024
@SimonDanisch
Copy link
Member

Didn't we have an issue and PR for this? :D

@asinghvi17
Copy link
Member Author

I vaguely remembered that too, but couldn't find it...maybe it's the shared attributes PR? But that's not merged yet either.

@ffreyer
Copy link
Collaborator

ffreyer commented Nov 21, 2024

#3735?

@asinghvi17
Copy link
Member Author

Yeah, that looks like the same issue!

function to_cairo_color(color, plot_object)
return to_color(color)
end

could probably be changed to query for alpha and include it. Then we don't have to worry about alpha at all, in any plot recipe.

We'd probably have to remove some of the explicit alpha mentions, as in lines etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CairoMakie This relates to CairoMakie, the vector backend for Makie based on Cairo.
Projects
None yet
Development

No branches or pull requests

3 participants