Don't throw exceptions on infinitesimal window sizes
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@345 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
66b4094d17
commit
58d58c0c07
1 changed files with 2 additions and 2 deletions
|
@ -128,14 +128,14 @@ class StonePainter {
|
|||
* @return the width of a stone in the current scale in pixels
|
||||
*/
|
||||
public int getStoneWidth() {
|
||||
return even(DEFAULT_WIDTH * scale);
|
||||
return Math.max(even(DEFAULT_WIDTH * scale), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the height of a stone in the current scale in pixels
|
||||
*/
|
||||
public int getStoneHeight() {
|
||||
return (int) (DEFAULT_WIDTH * scale / ASPECT_RATIO);
|
||||
return Math.max((int) (DEFAULT_WIDTH * scale / ASPECT_RATIO), 1);
|
||||
}
|
||||
|
||||
private BufferedImage prepaintStone(Color fg, Color bg, int value) {
|
||||
|
|
Reference in a new issue