Custom made polygon material


I need to create different entities(polygon, polyline…). and sometimes I need to customize the view with high degree of control.

For instance, a polygon might look like this:

Rectangles might look like:
What’s the best way to approach such customization? The closest thing I found is using labels with svg and add it to the entity. Is this the right approach?

important point to consider, the entity count will be in the hundreds or thousands.