Bounds implements IRenderingElement { public final double height() { return maxY - minY; } Bounds(double x1, double y1, double x2, double y2);  Bounds();  Bounds(IRenderingElement element); void add(IRenderingElement element); void add(double x, double y); void add(Bounds bounds); IRenderingElement root(); final double width(); final double height(); final boolean isEmpty(); @Override void accept(IRenderingVisitor visitor); @Override String toString(); public double minX; public double maxX; }
@Test public void testHeight() throws Exception { assertThat(new Bounds(2, 2, 7, 6).height(), is(closeTo(4d, 0.1))); }