< prev index next >

src/share/classes/sun/java2d/pisces/PiscesCache.java

Print this page




 150         y -= bboxY0;
 151         return touchedTile[y>>TILE_SIZE_LG][x>>TILE_SIZE_LG];
 152     }
 153 
 154     int minTouched(int rowidx) {
 155         return rowAARLE[rowidx][0];
 156     }
 157 
 158     int rowLength(int rowidx) {
 159         return rowAARLE[rowidx][1];
 160     }
 161 
 162     private void addTupleToRow(int row, int a, int b) {
 163         int end = rowAARLE[row][1];
 164         rowAARLE[row] = Helpers.widenArray(rowAARLE[row], end, 2);
 165         rowAARLE[row][end++] = a;
 166         rowAARLE[row][end++] = b;
 167         rowAARLE[row][1] = end;
 168     }
 169 
 170     void getBBox(int bbox[]) {
 171         // Since we add +1 to bboxX1,bboxY1 so when PTG asks for bbox,
 172         // we will give after -1
 173         bbox[0] = bboxX0;
 174         bbox[1] = bboxY0;
 175         bbox[2] = bboxX1 - 1;
 176         bbox[3] = bboxY1 - 1;
 177     }
 178 
 179     @Override
 180     public String toString() {
 181         String ret = "bbox = ["+
 182                       bboxX0+", "+bboxY0+" => "+
 183                       bboxX1+", "+bboxY1+"]\n";
 184         for (int[] row : rowAARLE) {
 185             if (row != null) {
 186                 ret += ("minTouchedX=" + row[0] +
 187                         "\tRLE Entries: " + Arrays.toString(
 188                                 Arrays.copyOfRange(row, 2, row[1])) + "\n");
 189             } else {
 190                 ret += "[]\n";
 191             }
 192         }
 193         return ret;
 194     }
 195 }


 150         y -= bboxY0;
 151         return touchedTile[y>>TILE_SIZE_LG][x>>TILE_SIZE_LG];
 152     }
 153 
 154     int minTouched(int rowidx) {
 155         return rowAARLE[rowidx][0];
 156     }
 157 
 158     int rowLength(int rowidx) {
 159         return rowAARLE[rowidx][1];
 160     }
 161 
 162     private void addTupleToRow(int row, int a, int b) {
 163         int end = rowAARLE[row][1];
 164         rowAARLE[row] = Helpers.widenArray(rowAARLE[row], end, 2);
 165         rowAARLE[row][end++] = a;
 166         rowAARLE[row][end++] = b;
 167         rowAARLE[row][1] = end;
 168     }
 169 









 170     @Override
 171     public String toString() {
 172         String ret = "bbox = ["+
 173                       bboxX0+", "+bboxY0+" => "+
 174                       bboxX1+", "+bboxY1+"]\n";
 175         for (int[] row : rowAARLE) {
 176             if (row != null) {
 177                 ret += ("minTouchedX=" + row[0] +
 178                         "\tRLE Entries: " + Arrays.toString(
 179                                 Arrays.copyOfRange(row, 2, row[1])) + "\n");
 180             } else {
 181                 ret += "[]\n";
 182             }
 183         }
 184         return ret;
 185     }
 186 }
< prev index next >