Shunoo Posted August 23, 2021 Posted August 23, 2021 I can't figure out how to draw the area for debuging purposes. I've tried g.drawRectangel(int x,int y, width,height) g.fillRectangle I just can't seem to understand how to use the function @Override public void onPaint(Graphics2D g) { } PS To create areas do i read the position (x and y) or the gridpos. (x and y). Also why does the getWalking().walk(Area) does not function?
Chris Posted August 24, 2021 Posted August 24, 2021 (edited) On 8/23/2021 at 12:37 PM, Shunoo said: I can't figure out how to draw the area for debuging purposes. I've tried g.drawRectangel(int x,int y, width,height) g.fillRectangle I just can't seem to understand how to use the function @Override public void onPaint(Graphics2D g) { } PS To create areas do i read the position (x and y) or the gridpos. (x and y). Also why does the getWalking().walk(Area) does not function? Easiest way to draw areas is by using the position list. area.getPositions().forEach(pos -> { if (pos != null && pos.isVisible()) g.draw(p.getPolygon()); }); Edited August 24, 2021 by Chris