/** Returns the bounding box of this Drawable in screen coordinates. */ @Override public final org.geogebra.common.awt.GRectangle getBounds() { if (!geo.isDefined() || !geo.isEuclidianVisible()) return null; org.geogebra.common.awt.GRectangle ret = null; if (lineVisible) ret = line.getBounds(); if (arrowheadVisible) ret = (ret == null) ? AwtFactory.prototype.newRectangle(gp.getBounds()) : AwtFactory.prototype.newRectangle(ret.union(gp.getBounds())); return ret; }
@Override public final boolean isInside(org.geogebra.common.awt.GRectangle rect) { return (lineVisible && rect.contains(line.getBounds())) || (arrowheadVisible && rect.contains(gp.getBounds())); }