Revision 403:9b093e1c2c02

View differences:

src/main/java/cz/agents/alite/vis/visualizable/implementation/PointVis.java
6 6

  
7 7
import javax.vecmath.Point2d;
8 8
import java.awt.*;
9
import java.awt.geom.Ellipse2D;
9 10
import java.awt.geom.Rectangle2D;
10 11

  
11 12
/**
......
29 30
    public void paint(Graphics2D canvas, Rectangle2D drawingRectangle) {
30 31
        Point2d center = adapter.convert(centerPosition);
31 32
        int x = Vis.transX(center.x);
32
        int y = Vis.transX(center.y);
33
        int y = Vis.transY(center.y);
33 34
        canvas.setColor(color);
34 35

  
35
        Rectangle2D point = new Rectangle2D.Double(x - radiusInPx, y - radiusInPx,
36
        Ellipse2D point = new Ellipse2D.Double(x - radiusInPx, y - radiusInPx,
36 37
                2 * radiusInPx + 1, 2 * radiusInPx + 1);
37 38

  
38
        if (drawingRectangle.intersects(point)) {
39
        if (drawingRectangle.intersects(point.getBounds2D())) {
39 40
            canvas.fill(point);
40 41
        }
41 42
    }

Also available in: Unified diff