Apparently getBoundingBox() is used internally in various places and needs
to not create a new Rectangle as well. git-svn-id: https://samskivert.googlecode.com/svn/trunk@715 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SmartPolygon.java,v 1.1 2002/02/19 03:41:41 mdb Exp $
|
// $Id: SmartPolygon.java,v 1.2 2002/04/27 22:07:05 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -38,4 +38,13 @@ public class SmartPolygon extends Polygon
|
|||||||
{
|
{
|
||||||
return (bounds == null) ? super.getBounds() : bounds;
|
return (bounds == null) ? super.getBounds() : bounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the internally cached bounds rectangle for this polygon.
|
||||||
|
* <em>Don't modify it!</em>
|
||||||
|
*/
|
||||||
|
public Rectangle getBoundingBox ()
|
||||||
|
{
|
||||||
|
return (bounds == null) ? super.getBoundingBox() : bounds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user