JDK-4937390 : Graphics.fillPolygon(...) depends on it's position on the screen
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2003-10-14
  • Updated: 2019-12-17
  • Resolved: 2019-12-17
Related Reports
Relates :  
Description

Name: spR10137			Date: 10/14/2003



Compile and run simple application. Try to change frame's position
on the screen. Notice, that polygon behaviour depends on it's
position. It looks defferent in left and right parts of the screen.

-------------------- ScreenPos.java --------------------
import java.awt.*;
import java.awt.event.*;

public class ScreenPos extends Frame implements ComponentListener {

    int[] xpts = {0x0a, 0x0a, 0x7e00, 0x3c};
    int[] ypts = {0x0a, 0x14, 0x32, 0x5a};
    Canvas c;
    public ScreenPos() {
        super("Fill GP Test");

        c = new Canvas() {
            public void paint(Graphics g) {
                g.setColor(Color.black);
                g.fillPolygon(xpts, ypts, 4);
            }
        };
        c.setSize(100, 300);
        c.setBackground(Color.white);
        add(c);
        addComponentListener(this);
    }

    public static void main(String[] args) {
        ScreenPos sp = new ScreenPos();
        sp.pack();
        sp.show();
    }

    public void componentHidden(ComponentEvent e) {
    }

    public void componentMoved(ComponentEvent e) {
        c.repaint();
    }

    public void componentResized(ComponentEvent e) {
        c.repaint();
    }

    public void componentShown(ComponentEvent e) {
        c.repaint();
    }
}
-------------------- end of file --------------------

======================================================================

Comments
EVALUATION Possibly an X11 problem. ###@###.### 2003-10-23
23-10-2003