Idea for subclassing java.awt.Paint in order to use a sketch as a raster implementation of the pure Java Paint class

I would like to make some notes and expose an idea about the possible use of the paint java class along side with processing.
The idea is to create a “new java class that implements Paint” and use it as a graphics2d capability lets say like a: setPaint(processingpaint);
I have found 2 old but interesting posts that share the same principle

Having used those extended paint methods to fill shapes in native java successfully with various perlin noise implementations, I was wondering if it is possible to think of a new paint class that can render the contents of a processing sketch (in pure java) via the Psurface or the Pimage canvas, as the Paint class return is a regular raster (much like the color and texturepaint subclasses). This “ProcessingPaint” Paint class implementation would have the ability to render the processing x,y canvas, use Affine transforms, pixel perfect scaling etc. This apparently is applicable to specific sketches that render static pixels, not sure about animations or moving vectors. Obviously only for the JAVA2D renderer, many possibilities to use it in pure java as a fill to shapes etc.

I am not familiar with that kind of context, so I am just sharing the idea in order to see what are the possibilities of such an integration, and the opinion of the java experts out there. Thanks…