Skip to content

Commit

Permalink
mod: 格式化
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlanglord committed Jul 25, 2023
1 parent 62d5ebd commit a98e9ea
Showing 1 changed file with 23 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ private class Holder {

@Override
public String toString() {
return "Holder{" +
"row=" + row +
", col=" + col +
'}';
return "Holder{" + "row=" + row + ", col=" + col + '}';
}
}

Expand All @@ -71,12 +68,8 @@ private class RenderRange {

@Override
public String toString() {
return "RenderRange{" +
"page=" + page +
", gridSize=" + gridSize +
", leftTop=" + leftTop +
", rightBottom=" + rightBottom +
'}';
return "RenderRange{" + "page=" + page + ", gridSize=" + gridSize + ", leftTop=" + leftTop +
", rightBottom=" + rightBottom + '}';
}
}

Expand All @@ -86,10 +79,7 @@ private class GridSize {

@Override
public String toString() {
return "GridSize{" +
"rows=" + rows +
", cols=" + cols +
'}';
return "GridSize{" + "rows=" + rows + ", cols=" + cols + '}';
}
}

Expand Down Expand Up @@ -270,8 +260,7 @@ private void loadVisible() {

}

private int loadPage(int page, int firstRow, int lastRow, int firstCol, int lastCol,
int nbOfPartsLoadable) {
private int loadPage(int page, int firstRow, int lastRow, int firstCol, int lastCol, int nbOfPartsLoadable) {
int loaded = 0;
for (int row = firstRow; row <= lastRow; row++) {
for (int col = firstCol; col <= lastCol; col++) {
Expand Down Expand Up @@ -307,14 +296,15 @@ private boolean loadCell(int page, int row, int col, float pageRelativePartWidth

if (renderWidth > 0 && renderHeight > 0) {
if (!pdfView.cacheManager.upPartIfContained(page, pageRelativeBounds, cacheOrder)) {
pdfView.renderingHandler.addRenderingTask(page,
renderWidth,
renderHeight,
pageRelativeBounds,
false,
cacheOrder,
pdfView.isBestQuality(),
pdfView.isAnnotationRendering()
pdfView.renderingHandler.addRenderingTask(
page,
renderWidth,
renderHeight,
pageRelativeBounds,
false,
cacheOrder,
pdfView.isBestQuality(),
pdfView.isAnnotationRendering()
);
}

Expand All @@ -329,9 +319,15 @@ private void loadThumbnail(int page) {
float thumbnailWidth = pageSize.getWidth() * Constants.THUMBNAIL_RATIO;
float thumbnailHeight = pageSize.getHeight() * Constants.THUMBNAIL_RATIO;
if (!pdfView.cacheManager.containsThumbnail(page, thumbnailRect)) {
pdfView.renderingHandler.addRenderingTask(page,
thumbnailWidth, thumbnailHeight, thumbnailRect,
true, 0, pdfView.isBestQuality(), pdfView.isAnnotationRendering()
pdfView.renderingHandler.addRenderingTask(
page,
thumbnailWidth,
thumbnailHeight,
thumbnailRect,
true,
0,
pdfView.isBestQuality(),
pdfView.isAnnotationRendering()
);
}
}
Expand Down

0 comments on commit a98e9ea

Please sign in to comment.