-
Notifications
You must be signed in to change notification settings - Fork 36
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
add missing Gray{T} constructor for colorant #278
Conversation
Codecov Report
@@ Coverage Diff @@
## master #278 +/- ##
==========================================
+ Coverage 84.04% 84.06% +0.02%
==========================================
Files 8 8
Lines 777 778 +1
==========================================
+ Hits 653 654 +1
Misses 124 124
Continue to review full report at Codecov.
|
@@ -515,6 +515,7 @@ function (::Type{C})() where {N, C <: ColorantN{N}} | |||
C(ntuple(_ -> d0, Val(N - 1))..., dx) | |||
end | |||
|
|||
Gray{T}(c::Colorant) where {T<:Union{Fractional,Bool}} = _new_colorant(Gray{T}, c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure why, I tried the following but it doesn't work.
(::Type{C})(x ) where {C <: Gray } = _new_colorant(C, x)
@johnnychen94 I apologize for leaving the development unattended. Thanks for your maintenance, it is much appreciated. By the way, why is the constructor of |
I wasn't that clear on this idea until you mentioned this. The intention was to fix some compatibility issues during the transition from 0.11.0 to 0.11.1 (which should be backward compatible). During the time @kimikage you were unavailable, nobody realized that the current master contains some unexpected breaking changes, and we (actually, Tim) just released them as patch releases, which was incorrect. This PR is a fixup to that. Also, this is why we have a So, if you decide to move the conversions to Colors, you can safely revert this patch commit in the master branch and continue the development of 0.12 until you're ready. |
fixes #277