August 23, 20214 yr 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?
August 24, 20214 yr 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, 20214 yr by Chris
Create an account or sign in to comment