code: public static Mirage newNinePatchContaining(NinePatch ninePatch, Rectangle content)
      {
          Rectangle bounds = ninePatch.getBoundsSurrounding(content);
  
          Mirage mirage = new NinePatchMirage(ninePatch, bounds.width, bounds.height);
          return new TransformedMirage(mirage,
              AffineTransform.getTranslateInstance(bounds.x, bounds.y), false);
      }
docs: Returns a new Mirage that's a NinePatch stretched and positioned to contain the given
  Rectangle.