Browse Source

Merge pull request #1488 in DESIGN/design from ~HUGH.C/design:release/10.0 to release/10.0

* commit 'c7ca31c085db9406e1ad37ef70acb9235ce8c6df':
  REPORT-27728 单元格设置背景色会遮挡原始边框
feature/big-screen
Hugh.C 5 years ago
parent
commit
7d5d42c923
  1. 2
      designer-realize/src/main/java/com/fr/grid/CellElementPainter.java
  2. 8
      designer-realize/src/main/java/com/fr/grid/GridUI.java

2
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);
}

8
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);

Loading…
Cancel
Save