Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+22 votes

I'm having issues with changing the default setting of arena bounds from this.arenaBounds = new Rectangle(0,0,frameWidth,frameHeight); I'm doing
int arenaWidth = (int)Math.abs(arenaPoints.get(1).getX() - arenaPoints.get(0).getX());
int arenaHeight = (int)Math.abs(arenaPoints.get(1).getY() - arenaPoints.get(0).getY());

project.getVideo().getArenaBounds().setBounds((int)event.getX(),(int)event.getY(), (int)(arenaWidth getVideoToCanvasRatio()), (int)(arenaHeightgetVideoToCanvasRatio()));

but it doesn't seem to be working correctly. I think I'm changing the 0,0 coordinates wrong.

asked in CSC285_Fall2018 by (100 points)

1 Answer

+7 votes

Our group uses a java.awt rectangle for the arena bounds so when we set it we do project.getArenaBounds.setRect() which works for us

answered by (100 points)
...