I'm not familiar with libgdx so the exact implementation in it is not something i could provide you. However, the concepts in play are pretty universal.
Assuming several things.
- You only want to fill in the red area as that is how your question sort of reads.
- You have the vertexes of the polygon you're looking to draw.
- LibGDX cannot draw a concave polygon natively.
- The polyons you're looking to draw have axially aligned points (more on that below)
You're looking for a function that can draw a concave polygon.
Without that we will have to break the polygon into convex shapes.
An example would look like this with the shape you provided being divided into 5 polygons, Ill go over one but the idea can be carried over for each.
A1 and A3 are the lowest points on the x axis(closest to 0, or they're the most negative)
A2 is aligned with A1 on the x axis.
A4 is aligned with A3 on the x axis.
A2 and A4 are the closest points that are axially aligned to A1 and A3.
Using this logic we've created a simple polygon any graphics library should be able to draw.
Repeat this logic for each cardinal direction, then use the inner most points (A2 and A4) to draw the inside polygon.
A simple check to find which points are not on the outside should solve that for you
A1.x < A2.x < some further point
Hopefully this quick answer helps in some way!