Instead of 4 different cropping constructors, unify them into a single constructor. This simplifies the code and also "flattens" the image structure when different sides of the image have been cropped.
Note: this is not intended as a performance optimisation and I have not measured the performance impact. Rather, I was wanting to learn more about vty internals and noticed this cleanup opportunity. I humbly submit the current patch for your consideration but no hard feelings if you prefer to leave things as they are.
Instead of 4 different cropping constructors, unify them into a single constructor. This simplifies the code and also "flattens" the image structure when different sides of the image have been cropped.
Note: this is not intended as a performance optimisation and I have not measured the performance impact. Rather, I was wanting to learn more about vty internals and noticed this cleanup opportunity. I humbly submit the current patch for your consideration but no hard feelings if you prefer to leave things as they are.