JuliaGraphics / Luxor.jl

Simple drawings using vector graphics; Cairo "for tourists!"
http://juliagraphics.github.io/Luxor.jl/
Other
588 stars 71 forks source link

Regression in opacity/hue settings in master? #256

Closed cormullion closed 1 year ago

cormullion commented 1 year ago

I noticed a slight difference between the opacity/hue settings with the current master (3.7.0) and the current release (3.6.0).

using Luxor

@draw begin
background("midnightblue")

sethue("red")
circle(O, 150, :fill)

setopacity(0.5)
sethue("green")

box(O, 100, 400, :fill)
end 

3.7.0:

Screenshot 2023-01-11 at 14 45 08

3.6.0:

Screenshot 2023-01-11 at 14 46 48

@oheil - I think this might have been introduced when the color-setting code was refactored? I'd be grateful for your opinion!

oheil commented 1 year ago

Yes, the bug is in drawings.jl with default value for alpha channel in function _set_current_color(r,g,b,a=1.0) This is wrong. There must be specific function _set_current_color(r,g,b) which doesn't change the alpha channel.

Do you want me do PR? Of course, but if not, just say...

cormullion commented 1 year ago

Thanks - it would be great if you did a PR some time - no hurry, of course 😀

oheil commented 1 year ago

I think I will produce some new tests for the latest bugs...

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.