Clojure2D/clojure2d

ColorProto does not work on Integers

yuhan0 opened this issue · 2 comments

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:

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.Integer

Is this an oversight or are we expected to manually cast values to long?

It's an oversight. I'll deploy a snapshot today. Thanks!

Fixed in 1.2.0-SNAPSHOT