diff --git a/designer-realize/src/main/java/com/fr/grid/CellElementPainter.java b/designer-realize/src/main/java/com/fr/grid/CellElementPainter.java index 607fde54f7..6148ee8d68 100644 --- a/designer-realize/src/main/java/com/fr/grid/CellElementPainter.java +++ b/designer-realize/src/main/java/com/fr/grid/CellElementPainter.java @@ -9,7 +9,7 @@ import com.fr.report.core.PaintUtils; import com.fr.report.elementcase.ElementCase; public class CellElementPainter { - public void paintBackground(Graphics2D g2d, ElementCase report, CellElement ce, int width, int height) { + public void paintBackground(Graphics2D g2d, ElementCase report, CellElement ce, double width, double height) { Style.paintBackground(g2d, ce.getStyle(), width, height); } diff --git a/designer-realize/src/main/java/com/fr/grid/GridUI.java b/designer-realize/src/main/java/com/fr/grid/GridUI.java index 266cb5cb02..ff027af084 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridUI.java +++ b/designer-realize/src/main/java/com/fr/grid/GridUI.java @@ -497,12 +497,12 @@ public class GridUI extends ComponentUI { paintCellElementRectangleList.add(this.tmpRectangle.clone()); - int cellWidth = (int) this.tmpRectangle.getWidth(); - int cellHeight = (int) this.tmpRectangle.getHeight(); + double cellWidth = this.tmpRectangle.getWidth(); + double cellHeight = this.tmpRectangle.getHeight(); // denny_Grid: 画Grid中单元格的内容(包括单元格的背景Content + Background), 不包括边框 - painter.paintBackground(g2d, report, tmpCellElement, cellWidth, cellHeight); - painter.paintContent(g2d, report, tmpCellElement, cellWidth, cellHeight, resolution); + painter.paintBackground(g2d, report, tmpCellElement, cellWidth - 1, cellHeight - 1); + painter.paintContent(g2d, report, tmpCellElement, (int) cellWidth, (int) cellHeight, resolution); // denny_Grid: 注意下面还要减一, 因为上面translate时加一 g2d.translate(-this.tmpRectangle.getX() - 1, -this.tmpRectangle.getY() - 1); paintAuthorityCell(g2d, tmpCellElement);