public RpfSubframe decompressSubframe(int x,int y,RpfSubframe subframe,RpfColortable colortable,RpfViewAttributes viewAttributes){
  boolean isDirectColorModel=(viewAttributes.colorModel == OMRasterObject.COLORMODEL_DIRECT);
  if (subframe == null) {
    subframe=new RpfSubframe();
  }
  if (colortable == null) {
    colortable=this.colortable;
  }
  if (!isDirectColorModel) {
    if (DEBUG_RPFDETAIL) {
      Debug.output("RpfFrame: decompress to byte[]");
    }
    byte[] pixels=decompressSubframe(x,y);
    subframe.setBitsAndColors(pixels,colortable.colors);
  }
 else {
    int[] pixels=decompressSubframe(x,y,colortable);
    subframe.setPixels(pixels);
  }
  return subframe;
}

public RpfSubframe decompressSubframe ( int x , int y , RpfSubframe subframe , RpfColortable colortable , RpfViewAttributes viewAttributes ) { boolean isDirectColorModel = ( viewAttributes . colorModel == OMRasterObject . COLORMODEL_DIRECT ) ; if ( subframe == null ) { subframe = new RpfSubframe ( ) ; } if ( colortable == null ) { colortable = this . colortable ; } if ( ! isDirectColorModel ) { if ( DEBUG_RPFDETAIL ) { Debug . output ( "RpfFrame: decompress to byte[]" ) ; } byte [ ] pixels = decompressSubframe ( x , y ) ; subframe . setBitsAndColors ( pixels , colortable . colors ) ; } else { int [ ] pixels = decompressSubframe ( x , y , colortable ) ; subframe . setPixels ( pixels ) ; } return subframe ; }
decompress a subframe into a cache entry omraster ( rpfsubframe ) . the rpfsubframe is returned , too , to emphasize what ' s happening .
