MarkStyle2D createMarkStyle(Mark mark, Object feature, Symbolizer symbolizer, double size) { Shape shape = getShape(mark, feature); if (shape == null) { throw new IllegalArgumentException( "The specified mark " + mark.getWellKnownName() + " was not found!"); } Composite composite = getComposite(symbolizer.getOptions()); MarkStyle2D ms2d = new MarkStyle2D(); ms2d.setShape(shape); ms2d.setFill(getPaint(mark.getFill(), feature, symbolizer)); ms2d.setFillComposite( composite != null ? composite : getComposite(mark.getFill(), feature)); ms2d.setStroke(getStroke(mark.getStroke(), feature)); ms2d.setContour(getStrokePaint(mark.getStroke(), feature)); ms2d.setContourComposite( composite != null ? composite : getStrokeComposite(mark.getStroke(), feature)); // in case of Mark we don't have a natural size, so we default // to 16 if (size <= 0) { size = DEFAULT_MARK_SIZE; } ms2d.setSize(size); return ms2d; }
ms2d.setFill(getPaint(mark.getFill(), feature)); ms2d.setFillComposite(getComposite(mark.getFill(), feature)); ms2d.setStroke(getStroke(mark.getStroke(), feature)); ms2d.setContour(getStrokePaint(mark.getStroke(), feature)); ms2d.setContourComposite(getStrokeComposite(mark.getStroke(), feature));
ms2d.setFill(getPaint(mark.getFill(), feature)); ms2d.setFillComposite(getComposite(mark.getFill(), feature)); ms2d.setStroke(getStroke(mark.getStroke(), feature)); ms2d.setContour(getStrokePaint(mark.getStroke(), feature)); ms2d.setContourComposite(getStrokeComposite(mark.getStroke(),