Examples of DrawMapParameter


Examples of org.locationtech.udig.project.ui.ApplicationGIS.DrawMapParameter

        final BufferedImage buffered = AWTSWTImageUtils.createBufferedImage( size.width, size.height );
        buffered.getGraphics().draw3DRect(1,1,size.width-3,size.height-3,false);
       
        if (map2 != null) {
            ReferencedEnvelope world = map2.getBounds(new NullProgressMonitor());
            DrawMapParameter toDraw = new DrawMapParameter(buffered.createGraphics(),
                    new Dimension(size.width, size.height), map2, new BoundsStrategy(world),
                    dpi[0], SelectionStyle.IGNORE, monitor, true, false);
            ApplicationGIS.drawMap(toDraw);
        }
        getDisplay().syncExec(new Runnable(){
View Full Code Here

Examples of org.locationtech.udig.project.ui.ApplicationGIS.DrawMapParameter

            /*
            Rectangle detailsBox = new Rectangle(whiteboxLoc.x, whiteboxLoc.y, whiteboxLoc.width, (int)(whiteboxLoc.height * 0.25));
            addSelectedFeatureDetails(mapCopy, detailsBox);
            */
           
            DrawMapParameter drawMapParameter =
                new DrawMapParameter(g,
                                     new java.awt.Dimension(contentDim.width, contentDim.height),
                                     mapCopy,
                                     boundsStrategy,
                                     dpi,
                                     selectionStyle,
View Full Code Here

Examples of org.locationtech.udig.project.ui.ApplicationGIS.DrawMapParameter

      BoundsStrategy boundsStrategy = new BoundsStrategy(scaleDenom);
     
      //final Map mapCopy = (Map) EcoreUtil.copy((EObject) map);
      final Map mapCopy = (Map) ApplicationGIS.copyMap(map);
       
      DrawMapParameter drawMapParameter =
          new DrawMapParameter(g,
                               new java.awt.Dimension(width, height),
                               mapCopy,
                               boundsStrategy,
                               imageSettingsPage.getFormat().getDPI(),
                               imageSettingsPage.getSelectionHandling(),
View Full Code Here

Examples of org.locationtech.udig.project.ui.ApplicationGIS.DrawMapParameter

            args = new Object[]{map.getName()};
            monitor.setTaskName(MessageFormat.format(pattern, args));
            int scaleDenom = MapSelectorPageWithScaleColumn.getScaleDenom(map);
            BoundsStrategy boundsStrategy = new BoundsStrategy(scaleDenom);

            DrawMapParameter drawMapParameter = new DrawMapParameter(g, new java.awt.Dimension(
                    width, height), map, boundsStrategy, imageSettingsPage.getFormat().getDPI(),
                    imageSettingsPage.getSelectionHandling(), monitor);

            renderedMap = ApplicationGIS.drawMap(drawMapParameter);
        } finally {
View Full Code Here

Examples of org.locationtech.udig.project.ui.ApplicationGIS.DrawMapParameter

            java.awt.Dimension awtSize = new java.awt.Dimension(
                    size.width, size.height);
            IMap modifiedMap = null;
            if (scaleDenom == -1) {
                //ApplicationGIS.drawMap(new DrawMapParameter(graphics, awtSize, getMap(), monitor, true));
                modifiedMap = ApplicationGIS.drawMap(new DrawMapParameter(graphics, awtSize, getMap(), null /*use current scale*/, 90, selectionStyle, monitor, true, true));
            }
            else {
                BoundsStrategy boundsStrategy = new BoundsStrategy(scaleDenom);
                modifiedMap = ApplicationGIS.drawMap(new DrawMapParameter(graphics, awtSize, getMap(), boundsStrategy, 90, selectionStyle, monitor, true, true));
            }

            //ApplicationGIS.drawMap makes a copy of the map, and may change its bounds.  If it does change
            //the bounds then update the original map to match (this will force the mapgraphics to update too)
            if (!getMap().getViewportModel().getBounds().equals(modifiedMap.getViewportModel().getBounds())) {
View Full Code Here

Examples of org.locationtech.udig.project.ui.ApplicationGIS.DrawMapParameter

        try {
            if (map != null) {
                preview = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_ARGB);
                Graphics2D g = preview.createGraphics();
                try {
                    ApplicationGIS.drawMap(new DrawMapParameter(g, new java.awt.Dimension(
                            size.width, size.height), this.map, monitor));
                } finally {
                    g.dispose();
                }
                current = new State(map.getViewportModel(), getBox().getSize());
View Full Code Here

Examples of org.locationtech.udig.project.ui.ApplicationGIS.DrawMapParameter

                h,
                BufferedImage.TYPE_INT_RGB);
        Graphics2D g = imageOfRastersOnly.createGraphics();
       
        //define a DrawMapParameter object with a custom BoundsStrategy if a custom scale is set
        DrawMapParameter drawMapParameter = null;
       
        double scaleDenom = (page1.getScaleOption() == ExportPDFWizardPage1.CUSTOM_MAP_SCALE) ? page1.getCustomScale() : currentViewportScaleDenom;
       
        drawMapParameter =
            new DrawMapParameter(g,
                             new java.awt.Dimension(w, h),
                             mapWithRasterLayersOnly,
                             new BoundsStrategy(scaleDenom),
                             page1.getDpi(),
                             SelectionStyle.EXCLUSIVE_ALL,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.