ColorProto does not work on Integers
yuhan0 opened this issue · 2 comments
yuhan0 commented
The documentation states that a color can be represented by
Integer - packed ARGB value. Example: 0xffaa01.
But the protocol only implements this for Long values:
clojure2d/src/clojure2d/color.clj
Line 404 in 5262658
This means that eg. mapping clojure2d.color functions over int[] arrays throws an error:
(map clojure2d.color/hue (int-array [0xffaa01]))
;; => No implementation of method: :to-color of protocol: #'clojure2d.color/ColorProto found for class: java.lang.IntegerIs this an oversight or are we expected to manually cast values to long?
genmeblog commented
It's an oversight. I'll deploy a snapshot today. Thanks!
genmeblog commented
Fixed in 1.2.0-SNAPSHOT