/** * Notify all listenerList that have registered interest for * notification on this event type. * * Note: This method only fires an event, if the invalidated area * is outside of the canvas bounds. */ protected void maybeFireBoundsInvalidated(Rectangle invalidatedArea) { Drawing d = getDrawing(); Rectangle2D.Double canvasBounds = new Rectangle2D.Double(0, 0, 0, 0); if (d.get(CANVAS_WIDTH) != null) { canvasBounds.width += d.get(CANVAS_WIDTH); } if (d.get(CANVAS_HEIGHT) != null) { canvasBounds.height += d.get(CANVAS_HEIGHT); } if (!canvasBounds.contains(invalidatedArea)) { fireBoundsInvalidated(invalidatedArea); } }