I'm currently working on a cross-platform application (actually a game using libgdx), and I need a constructive area geometry implementation for some algorithms.
The problem is that the Android API does not contain the java.awt.geom.Area
implementation. It does contain the android.graphics.Region
class 'though, which seems to be able to perform the same thing, meaning in this context defining polygons and then performing basic logical operation on their areas.
The solution seems to be to develop an adapter interface, and have each distribution (Java SE/Android) set the appropriate implementation at startup.
This is simple enough, but after some searching I'm baffled that I haven't yet encountered an implementation of the aforementioned solution.
My question is: is there, after all, a library that actually does already this, or, alternatively, another, easier solution to the problem, e.g. buried somewhere in the "common" Java API?