Java equivalent to .NET's ColorBlend
What is the closest equivalent of .NET's ColorBlend /InterpolationColors in Java?
Update: See my own solution below. Also, I needed this for my Android App.
Nearest seems to be java.awt.GradientPaint
I think I got the answer. I was actually looking this for Android for drawing a linear gradient line with multiple colors at various stops. Turns out Android's LinearGradient's constructor takes parameters for both colors and positions. To imitate .net's ColorBlend I'll just create a ColorBlend class with setter/getters for positions and colors.
For Java SE:
http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/ext/awt/LinearGradientPaint.html
(Sun has sponsored this Apache project. It is also part of their JavaFX product line.)
精彩评论