Skip to content

Commit

Permalink
Merge pull request #276 from JuliaGraphics/yyc/0.6
Browse files Browse the repository at this point in the history
Fix 0.6 typealias depwarn
  • Loading branch information
timholy authored Feb 14, 2017
2 parents 0f3d493 + a976aba commit d479df3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ julia 0.5
ColorTypes 0.3.0
FixedPointNumbers 0.3.0
Reexport
Compat 0.17.0
Compat 0.18.0
10 changes: 5 additions & 5 deletions src/Colors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ using FixedPointNumbers, ColorTypes, Reexport, Compat
# deprecated exports
export U8, U16

typealias AbstractGray{T} Color{T,1}
@compat AbstractGray{T} = Color{T,1}
using ColorTypes: TransparentGray
typealias AbstractAGray{C<:AbstractGray,T} AlphaColor{C,T,2}
typealias AbstractGrayA{C<:AbstractGray,T} ColorAlpha{C,T,2}
typealias Color3{T} Color{T,3}
typealias Transparent4{C<:Color3,T} TransparentColor{C,T,4}
@compat AbstractAGray{C<:AbstractGray,T} = AlphaColor{C,T,2}
@compat AbstractGrayA{C<:AbstractGray,T} = ColorAlpha{C,T,2}
@compat Color3{T} = Color{T,3}
@compat Transparent4{C<:Color3,T} = TransparentColor{C,T,4}

import Base: ==, +, -, *, /
import Base: convert, eltype, hex, isless, linspace, show, typemin, typemax
Expand Down
2 changes: 1 addition & 1 deletion src/algorithms.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Arithmetic
#XYZ and LMS are linear vector spaces
typealias Linear3 Union{XYZ, LMS}
const Linear3 = Union{XYZ, LMS}
+{C<:Linear3}(a::C, b::C) = C(comp1(a)+comp1(b), comp2(a)+comp2(b), comp3(a)+comp3(b))
-{C<:Linear3}(a::C, b::C) = C(comp1(a)-comp1(b), comp2(a)-comp2(b), comp3(a)-comp3(b))
-(a::Linear3) = typeof(a)(-comp1(a), -comp2(a), -comp3(a))
Expand Down

0 comments on commit d479df3

Please sign in to comment.