-
Bug
-
Resolution: Fixed
-
P4
-
internal
-
x86_64
-
os_x
While using Metal rendering pipeline, it is observed that drawing polyline twice in XOR mode leaves out some traces (only with uiScale=1.0 or on external monitor).
Expected :
Drawing something twice in XOR Mode should clear off the drawing.
Tested with this code -
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
g2d.setBackground(Color.BLUE);
g2d.clearRect(0, 0, 500, 500);
int min = 10;
int max = 210;
int mid = 110;
int xdp[] = {min, max, min, max, min, max};
int ydp[] = {min, min, mid, max, max, mid};
g2d.setXORMode(Color.GREEN);
g2d.drawPolygon(xdp, ydp, xdp.length);
g2d.drawPolygon(xdp, ydp, xdp.length);
}
Expected :
Drawing something twice in XOR Mode should clear off the drawing.
Tested with this code -
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
g2d.setBackground(Color.BLUE);
g2d.clearRect(0, 0, 500, 500);
int min = 10;
int max = 210;
int mid = 110;
int xdp[] = {min, max, min, max, min, max};
int ydp[] = {min, min, mid, max, max, mid};
g2d.setXORMode(Color.GREEN);
g2d.drawPolygon(xdp, ydp, xdp.length);
g2d.drawPolygon(xdp, ydp, xdp.length);
}
- relates to
-
JDK-8251566 Drawing polyline in XOR mode can be optimised (only with uiScale=1.0)
- Open
-
JDK-8233226 Implement XOR Mode rendering option
- Resolved