Custom 9-slice border

The built-in suport for 9-slice backgrounds/borders does not support any form of tiling / adaptive sizing. So we would like to create our own custom control. What we can’t figure out is how do you do repeated / tiled background?

According to other thread it is not yet possible, but here it says that it should be doable with “custom mesh API”:

@uDamian 6 months since that original discussion, is that still the only way to do background tiling? Could you give us more details how it can be done?

For the record, you can find our implementation in this thread: