Package org.locationtech.udig.project.internal.render

Examples of org.locationtech.udig.project.internal.render.ViewportModel


            Layer layer ) {
        Map map = info.getLeft();
        Dimension size = info.getRight().getLeft();
        double scale = info.getRight().getRight();

        ViewportModel viewportModel = map.getViewportModelInternal();
        ReferencedEnvelope bounds = (ReferencedEnvelope) viewportModel.getBounds();
        BoundsStrategy boundsStrategy = new BoundsStrategy(scale);

        RenderContext context = null;
        if (inPreviewMode && !Float.isNaN(scaleFactor)) {
            float dpiFloat = (float) DEFAULTDPI * scaleFactor;
 
View Full Code Here


                Map copy = (Map) EcoreUtil.copy(map);

                // we need the original map and its box to correctly calculate the
                // scale so we must do it now
                Dimension size = new Dimension(box.getSize().width, box.getSize().height);
                ViewportModel viewportModel = map.getViewportModelInternal();

                ReferencedEnvelope bounds = (ReferencedEnvelope) viewportModel.getBounds();

                double scale = ScaleUtils.calculateScaleDenominator(bounds, size, 90);

                Pair<Dimension, Double> details = new Pair<Dimension, Double>(size, scale);
                return new Pair<Map, Pair<Dimension, Double>>(copy, details);
View Full Code Here

                                        .findEPSGCode(crs, monitor);
                                if (found == null) {
                                    return;
                                }

                                ViewportModel model = (ViewportModel) map.getViewportModel();
                                model.eSetDeliver(false);
                                try {
                                    model.setCRS(found);
                                    codes.addAll(CRSUtil.extractAuthorityCodes(found));
                                } finally {
                                    model.eSetDeliver(true);
                                }
                            }

                        });
                    } catch (InvocationTargetException e) {
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.internal.render.ViewportModel

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.