9-slicing is a common technique for texturing UI controls. The corners, edges, and center are stretched separately which maintains the scale of any borders.
This would probably need a special mesh generator for the correctly stretched 3x3 plane fitted to the entity dimensions, as well as new properties for the pixel margins on each edge. A margin of [0,0,0,0] would be the default and would behave the same as Image entities already do, with a single stretched quad.
9-slicing is a common technique for texturing UI controls. The corners, edges, and center are stretched separately which maintains the scale of any borders.
This would probably need a special mesh generator for the correctly stretched 3x3 plane fitted to the entity dimensions, as well as new properties for the pixel margins on each edge. A margin of [0,0,0,0] would be the default and would behave the same as Image entities already do, with a single stretched quad.