From 2728eca125ea032c24d69c66a8d0043a66e9814c Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Thu, 12 Mar 2020 17:36:06 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-27728=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=83=8C=E6=99=AF=E8=89=B2=E4=BC=9A=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E5=8E=9F=E5=A7=8B=E8=BE=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/grid/CellElementPainter.java | 2 +- designer-realize/src/main/java/com/fr/grid/GridUI.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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);