if (sourceRegion != null) { int num_rows = (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1) / sourceYSubsampling;  int num_columns = (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1) / sourceXSubsampling;  if (num_rows <= 0 || num_columns <= 0) throw new IllegalStateException("zero pixels in source region"); }
  public void setSourceRegion(Rectangle sourceRegion)  {    if (sourceRegion != null	&& (sourceRegion.x < 0	    || sourceRegion.y < 0	    || sourceRegion.width <= 0	    || sourceRegion.height <= 0))      throw new IllegalArgumentException("illegal source region");        // FIXME: Throw IllegalStateException.    this.sourceRegion = sourceRegion;  }