Closed smelc closed 7 years ago
Interesting; these seem close to some existing methods for GreasedRegion and CoordPacker (extend is like expand, and getExternalBorder is like fringe), but they have different return types, so the different names work out fine. I think I can merge this without issues, and I'll add some code after that so GreasedRegion uses expand() on a copy of itself to implement extend(), and similarly for getExternalBorder().
Hm, the docs don't specify how adjacency is determined for extend() and getExternalBorder(). I had thought they would use 4-way orthogonal-only adjacency, but checking the code it looks like they use 8-way adjacency, including diagonal. I'll add a note to the docs.
Indeed they use 8-way adjacency.
… int), extend(), and getExternalBorder(). API change: replace use of Rectange.Impl::expand8Way by Zone::extend()