@Override protected void encode(Graphic g) { if (!flatten) push("graphic"); inline(new AnchorPointEncoder(g.getAnchorPoint())); inline(new DisplacementEncoder(g.getDisplacement())); put("gap", nullIf(g.getGap(), 0d), nullIf(g.getInitialGap(), 0d)); put("opacity", nullIf(g.getOpacity(), 1)); put("size", g.getSize()); put("rotation", nullIf(g.getRotation(), 0d)); put("symbols", new SymbolsEncoder(g)); } }
@Override public void visit(Graphic gr) { if (gr.getAnchorPoint() != null) { gr.getAnchorPoint().accept(this); } if (gr.getDisplacement() != null) { gr.getDisplacement().accept(this); } for (ExternalGraphic eg : gr.getExternalGraphics()) { eg.accept(this); } if (gr.getGap() != null) { //gr.getGap().accept(visitor, extraData) } if (gr.getInitialGap() != null) { //gr.getInitialGap().accept(visitor, extraData) } for (Mark m : gr.getMarks()) { m.accept(this); } if (gr.getOpacity() != null) { //gr.getOpacity().accept(visitor, extraData) } if (gr.getRotation() != null) { //gr.getRotation().accept(visitor, extraData) } if (gr.getSize() != null) { //gr.getSize().accept(visitor, extraData) } }
@Override protected void encode(Graphic g) { if (!flatten) push("graphic"); inline(new AnchorPointEncoder(g.getAnchorPoint())); inline(new DisplacementEncoder(g.getDisplacement())); put("gap", nullIf(g.getGap(), 0d), nullIf(g.getInitialGap(), 0d)); put("opacity", nullIf(g.getOpacity(), 1)); put("size", g.getSize()); put("rotation", nullIf(g.getRotation(), 0d)); put("symbols", new SymbolsEncoder(g)); } }
expInitialGap = graphic.getInitialGap();
expInitialGap = graphic.getInitialGap();
expInitialGap = graphicStroke.getInitialGap();