Filling polygons is a mathematical challenge and ways above the head of a Cortex M0 CPU (at least if you want an acceptable timing) like the one on the Nextion HMIs, even on assembly level.
Most polygon filling algorithms rely on painting the boundaries first, and then start filling the interior until an already colored boundary pixel is found. The use of these is not possible on the Nextion since you have no means to read back the color of a specific pixel.
You could instead use one of the algorithms of the scan line techniques group. But since you can’t read out pixels, you’d have to calculate several intersection points with the polygon edges for each single scan line before you start drawing along this specific line. This could be done in Nextion code, but I’d worry about execution speed.
There are special graphic processors (GPUs) which have polygon drawing commands and the ability to decompose a complex polygon into several simpler ones in their hardware instruction set. But then, we are in the >300USD Nvidia product range and not longer on a 20USD HMI…