private void testFromPolygonCss(FigureStyle expectedStyle, String css) { FigureStyle style = new DefaultFigureStyle(); style.fromCssString(css); assertEquals(expectedStyle.getFillColor(), style.getFillColor()); assertEquals(expectedStyle.getFillOpacity(), style.getFillOpacity(), 1E-10); assertEquals(expectedStyle.getStrokeColor(), style.getStrokeColor()); assertEquals(expectedStyle.getStrokeOpacity(), style.getStrokeOpacity(), 1E-10); assertEquals(expectedStyle.getStrokeWidth(), style.getStrokeWidth(), 1E-10); // FIXME - these sometimes fail due to lossy alpha conversion (nf) // assertEquals(expectedStyle.getFillPaint(), style.getFillPaint()); // assertEquals(expectedStyle.getStrokePaint(), style.getStrokePaint()); }