Package org.geotools.styling.visitor

Examples of org.geotools.styling.visitor.RescaleStyleVisitor


        double estimatedSize = estimator.getBuffer();
        Symbolizer rescaled = symbolizer;
        if (estimatedSize > w || estimatedSize > h) {
          // rescale necessary
          double scale = Math.min(w, h) / estimatedSize;
          RescaleStyleVisitor rescaler = new RescaleStyleVisitor(scale);
          rescaler.visit(symbolizer);
          rescaled = (Symbolizer) rescaler.getCopy();
        }
        Style2D style2d = styleFactory.createStyle(sample, rescaled, scaleRange);
        LiteShape2 shape = createShape(symbolizer, w, h);
        if (style2d != null) {
          STYLED_SHAPE_PAINTER.paint(g2d, shape, style2d, 1.0);
View Full Code Here


        Style style = this.styleSupplier.load(httpRequestFactory, source, mapContext);

        if (mapContext.isDpiSensitiveStyle() && mapContext.getDPI() > mapContext.getRequestorDPI()) {
            // rescale styles for a higher dpi print
            double scaleFactor = mapContext.getDPI() / mapContext.getRequestorDPI();
            RescaleStyleVisitor scale = new RescaleStyleVisitor(scaleFactor);
            style.accept(scale);
            style = (Style) scale.getCopy();
        }

        return Lists.newArrayList(new FeatureLayer(source, style));
    }
View Full Code Here

TOP

Related Classes of org.geotools.styling.visitor.RescaleStyleVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.