/* 344 */ Method method = null;
/* */ try {
/* 346 */ method = GRAPHICS2D_CLASS.getMethod(name, argTypes);
/* */ } catch (Exception e) {
/* 348 */ String message = JaiI18N.getString("TiledImageGraphics2") + name;
/* 349 */ sendExceptionToListener(message, new ImagingException(e));
/* */ }
/* */
/* 354 */ Rectangle bounds = new Rectangle(x, y, width, height);
/* 355 */ bounds = getTransform().createTransformedShape(bounds).getBounds();
/* */
/* 358 */ int minTileX = this.tiledImage.XToTileX(bounds.x);
/* 359 */ if (minTileX < this.tileXMinimum)
/* 360 */ minTileX = this.tileXMinimum;
/* 361 */ int minTileY = this.tiledImage.YToTileY(bounds.y);
/* 362 */ if (minTileY < this.tileYMinimum)
/* 363 */ minTileY = this.tileYMinimum;
/* 364 */ int maxTileX = this.tiledImage.XToTileX(bounds.x + bounds.width - 1);
/* 365 */ if (maxTileX > this.tileXMaximum)
/* 366 */ maxTileX = this.tileXMaximum;
/* 367 */ int maxTileY = this.tiledImage.YToTileY(bounds.y + bounds.height - 1);
/* 368 */ if (maxTileY > this.tileYMaximum) {
/* 369 */ maxTileY = this.tileYMaximum;
/* */ }
/* */
/* 372 */ for (int tileY = minTileY; tileY <= maxTileY; tileY++) {
/* 373 */ int tileMinY = this.tiledImage.tileYToY(tileY);
/* 374 */ for (int tileX = minTileX; tileX <= maxTileX; tileX++) {
/* 375 */ int tileMinX = this.tiledImage.tileXToX(tileX);
/* */
/* 378 */ WritableRaster wr = this.tiledImage.getWritableTile(tileX, tileY);
/* 379 */ wr = wr.createWritableTranslatedChild(0, 0);
/* */
/* 382 */ BufferedImage bi = new BufferedImage(this.colorModel, wr, this.colorModel.isAlphaPremultiplied(), this.properties);
/* */
/* 388 */ Graphics2D g2d = bi.createGraphics();
/* */
/* 391 */ copyState(g2d);
/* */ try
/* */ {
/* 396 */ Point2D origin2D = g2d.getTransform().transform(new Point2D.Double(), null);
/* */
/* 399 */ Point pt = new Point((int)origin2D.getX() - tileMinX, (int)origin2D.getY() - tileMinY);
/* */
/* 401 */ Point2D pt2D = g2d.getTransform().inverseTransform(pt, null);
/* */
/* 403 */ g2d.translate(pt2D.getX(), pt2D.getY());
/* */ } catch (Exception e) {
/* 405 */ String message = JaiI18N.getString("TiledImageGraphics3");
/* 406 */ sendExceptionToListener(message, new ImagingException(e));
/* */ }
/* */
/* */ try
/* */ {
/* 412 */ Object retVal = method.invoke(g2d, args);
/* 413 */ if ((retVal != null) && (retVal.getClass() == Boolean.TYPE))
/* 414 */ returnValue = ((Boolean)retVal).booleanValue();
/* */ }
/* */ catch (Exception e) {
/* 417 */ String message = JaiI18N.getString("TiledImageGraphics3") + " " + name;
/* */
/* 419 */ sendExceptionToListener(message, new ImagingException(e));
/* */ }
/* */
/* 424 */ g2d.dispose();
/* */
/* 427 */ this.tiledImage.releaseWritableTile(tileX, tileY);