Closed StevenSiew closed 4 months ago
Hi! It's a reasonable idea. There's already a getcolor()
function, a gethue()
function would be easy to add.
In general there's an inconsistency in the APl: the interface style of set...(nothing)
to do the equivalent get...()
is sometimes available and sometimes not. For example, there's a getline()
to match setline()
, but a setstrokescale(nothing)
rather than a getstrokescale()
. There's no setantialias(nothing)
or setlinecap(nothing)
. And sometimes there aren't available hooks to get the information that you can set (getopacity()
). So I think the interface will continue to be inconsistent even with these additions ... :)
Luxor v3.9:
julia-1.10> Drawing()
Luxor drawing: (type = :png, width = 800.0, height = 800.0, location = luxor-drawing.png)
julia-1.10> sethue()
RGB{Float64}(0.0,0.0,0.0)
julia-1.10> getcolor()
RGBA{Float64}(0.0,0.0,0.0,1.0)
julia-1.10> setcolor()
RGBA{Float64}(0.0,0.0,0.0,1.0)
Please update sethue() amd setcolor() to accept Nothing arguement to return the current values of color and alpha
and make two new functions
you can also add this