I have never tried to modify anything so deep like the jdk itself, but I was wondering how hard or practical would that be for a specific task. The purpose is to experiment/test very high resolution image gradients with fine details, so color coordinate positions with better accuracy seems critical. Currently java gradient constructors accept float values only for coordinates. https://docs.oracle.com/javase/7/docs/api/java/awt/GradientPaint.html
Do you think it is possible to change those coordinate float references to double? Would it be just like changing minor parameters in source or something more complex? Ideally those classes should support float and double at the same time (use somehow both contractors much like Path2D.Double Path2D.Float) but this is not a prerequisite for me, only the easiest way, just doubles. Performance is not an issue as images are static, no animations.
Considering the modular nature of java 17 LTS, what are the steps to follow for a task like this one, if possible? Any guidance will be much appreciated!
(javaFX as far as I can see support gradients with double precision, but I cannot use this for various reasons)
Although it was not the solution to this specific case, I have recompiled successfully all batik gradientpaint classes, those seem to be almost the same as native (I guess batik is the original source anyway).
e.g. org.apache.batik.ext.awt.RadialGradientPaint; So this can be done through batik's source and then use those instead of native with "double" coordinates.