How can I get overlapping area of 2 Polygons

Godot Version

godot4

Question

I I’m trying to make a game to that draw similar polygon to given one so I have to calculate the similarity of two polygons. The problem is to calculate similarity of 2 polygons I need overlapping area of those polygons. I couldn’t find a way to get overlapping area for both convex polygon and concave polygon.