FilledPolygon implements InteractiveGraphicsElement, AgnosticPolygon { @Override public boolean contains(Coordinate point) { return polygon.contains(point); }  @Override void paint(Canvas graphics); @Override boolean contains(Coordinate point); @Override void toggle(); void addPoint(int x, int y); void moveBy(int dx, int dy); void fill(RGBColor fill); void setAlpha(int alpha); void whenToggledDo(Runnable runnable); void setText(String text); void position(ShapeWithPosition control); void setStroke(RGBColor stroke); @Override void setBorderColor(RGBColor borderColor);  }
@Test public void containsPointOnPolygonBorder() throws Exception { assertThat(filledPolygon.contains(new Coordinate(0, 0)), is(true)); }
@Test public void doesNotContainPointOutside() throws Exception { assertThat(filledPolygon.contains(new Coordinate(3, 3)), is(false)); }
@Test public void containsPointInPolygon() throws Exception { assertThat(filledPolygon.contains(new Coordinate(1, 1)), is(true)); }