if (ls2d.getGraphicStroke() != null) { drawWithGraphicsStroke( graphics, dashShape(shape, ls2d.getStroke()), ls2d.getGraphicStroke(), isLabelObstacle); } else {
public static double getStyle2DSize(Style2D style) { if (style instanceof GraphicStyle2D) { final BufferedImage image = ((GraphicStyle2D) style).getImage(); return maxSize(image.getWidth(), image.getHeight()); } else if (style instanceof IconStyle2D) { final Icon icon = ((IconStyle2D) style).getIcon(); return maxSize(icon.getIconWidth(), icon.getIconHeight()); } else if (style instanceof LineStyle2D) { LineStyle2D ls = ((LineStyle2D) style); double gsSize = getStyle2DSize(ls.getGraphicStroke()); double strokeSize = 0; if (ls.getStroke() instanceof BasicStroke) { strokeSize = ((BasicStroke) ls.getStroke()).getLineWidth(); } double offset = ls.getPerpendicularOffset(); double lineSize = maxSize(maxSize(gsSize, strokeSize), offset); // a MarkStyle2D is also a LineStyle2D, but we have to account for the symbol size if (style instanceof MarkStyle2D) { MarkStyle2D mark = (MarkStyle2D) style; return mark.getSize() + lineSize; } else { return lineSize; } } else { return 0; } }
public static double getStyle2DSize(Style2D style) { if(style instanceof GraphicStyle2D) { final BufferedImage image = ((GraphicStyle2D) style).getImage(); return maxSize(image.getWidth(), image.getHeight()); } else if(style instanceof IconStyle2D) { final Icon icon = ((IconStyle2D) style).getIcon(); return maxSize(icon.getIconWidth(), icon.getIconHeight()); } else if(style instanceof LineStyle2D) { LineStyle2D ls = ((LineStyle2D) style); double gsSize = getStyle2DSize(ls.getGraphicStroke()); double strokeSize = 0; if(ls.getStroke() instanceof BasicStroke) { strokeSize = ((BasicStroke) ls.getStroke()).getLineWidth(); } return maxSize(gsSize, strokeSize); } else { return 0; } }
if (ls2d.getGraphicStroke() != null) { drawWithGraphicsStroke(graphics, dashShape(shape, ls2d.getStroke()), ls2d.getGraphicStroke(), isLabelObstacle); } else { Paint paint = ls2d.getContour();
if (ls2d.getGraphicStroke() != null) { drawWithGraphicsStroke(graphics, dashShape(shape, ls2d.getStroke()), ls2d.getGraphicStroke()); } else { Paint paint = ls2d.getContour();
if (ls2d.getGraphicStroke() != null) { drawWithGraphicsStroke(graphics, shape, ls2d.getGraphicStroke()); } else { Paint paint = ls2d.getContour();
if (ls2d.getGraphicStroke() != null) { drawWithGraphicsStroke(graphics, shape, ls2d .getGraphicStroke()); } else { Paint paint = ls2d.getContour();