private float getSymbolHeight(InternalFeature f) { SymbolInfo info = f.getStyleInfo().getSymbol(); if (info.getCircle() != null) { return 2 * info.getCircle().getR(); } else { return info.getRect().getH(); } }
private FeatureStyleInfo mergeStyle(FeatureStyleInfo base, FeatureStyleInfo extension) { FeatureStyleInfo merged = new FeatureStyleInfo(); merged.setDashArray(extension.getDashArray() != null ? extension.getDashArray() : base.getDashArray()); merged.setFillColor(extension.getFillColor() != null ? extension.getFillColor() : base.getFillColor()); merged.setFillOpacity(extension.getFillOpacity() != -1 ? extension.getFillOpacity() : base.getFillOpacity()); merged.setStrokeColor(extension.getStrokeColor() != null ? extension.getStrokeColor() : base.getStrokeColor()); merged.setStrokeOpacity(extension.getStrokeOpacity() != -1 ? extension.getStrokeOpacity() : base .getStrokeOpacity()); merged.setSymbol(extension.getSymbol() != null ? extension.getSymbol() : base.getSymbol()); merged.setStrokeWidth(extension.getStrokeWidth() != -1 ? extension.getStrokeWidth() : base.getStrokeWidth()); return merged; }
private void drawPoint(PdfContext context, Rectangle iconRect, Color fillColor, Color strokeColor) { float baseWidth = iconRect.getWidth() / 10; SymbolInfo symbol = styleInfo.getSymbol(); if (symbol.getImage() != null) { try { Image pointImage = Image.getInstance(symbol.getImage().getHref()); context.drawImage(pointImage, iconRect, iconRect); } catch (Exception ex) { // NOSONAR log.error("Not able to create image for POINT Symbol", ex); } } else if (symbol.getRect() != null) { context.fillRectangle(iconRect, fillColor); context.strokeRectangle(iconRect, strokeColor, baseWidth / 2); } else { context.fillEllipse(iconRect, fillColor); context.strokeEllipse(iconRect, strokeColor, baseWidth / 2); } }
/** * Copy constructor. Creates a deep copy of the specified {@link FeatureStyleInfo} object. * * @param other the feature style to copy * @since 1.10.0 */ public FeatureStyleInfo(FeatureStyleInfo other) { setDashArray(other.getDashArray()); setFillColor(other.getFillColor()); setFillOpacity(other.getFillOpacity()); setFormula(other.getFormula()); setLayerType(other.getLayerType()); setName(other.getName()); setStrokeColor(other.getStrokeColor()); setStrokeOpacity(other.getStrokeOpacity()); setStrokeWidth(other.getStrokeWidth()); setSymbol(new SymbolInfo(other.getSymbol())); }
SymbolInfo symbol = featureStyle.getSymbol(); SymbolizerTypeInfo symbolizer = null; StrokeInfo stroke = createStroke(featureStyle.getStrokeColor(), featureStyle.getStrokeWidth(),
symbol = style.getSymbol();