Examples of worldToPixel()


Examples of org.locationtech.udig.project.internal.render.ViewportModel.worldToPixel()

            Set<ReferencedEnvelope> keySet = tiles.keySet();
              for (ReferencedEnvelope env : keySet) {
                Tile tile = tiles.get(env);
                //System.out.println("SWTImage: "+tile.getSWTImage());
                ViewportModel viewportModelInternal = tile.getRenderExecutor().getRenderer().getContext().getViewportModelInternal();
                java.awt.Point a = viewportModelInternal.worldToPixel(new Coordinate(env.getMinX(), env.getMinY()));
              java.awt.Point b = viewportModelInternal.worldToPixel(new Coordinate(env.getMaxX(), env.getMaxY()));
                    int width = b.x - a.x;
                    int height = a.y - b.y;
              synchronized (tile) {
                      //an exception can be thrown here if the image has been disposed of
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.ViewportModel.worldToPixel()

              for (ReferencedEnvelope env : keySet) {
                Tile tile = tiles.get(env);
                //System.out.println("SWTImage: "+tile.getSWTImage());
                ViewportModel viewportModelInternal = tile.getRenderExecutor().getRenderer().getContext().getViewportModelInternal();
                java.awt.Point a = viewportModelInternal.worldToPixel(new Coordinate(env.getMinX(), env.getMinY()));
              java.awt.Point b = viewportModelInternal.worldToPixel(new Coordinate(env.getMaxX(), env.getMaxY()));
                    int width = b.x - a.x;
                    int height = a.y - b.y;
              synchronized (tile) {
                      //an exception can be thrown here if the image has been disposed of
                      //since it was retrieved or something else bad happens while drawing
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.ViewportModel.worldToPixel()

            Set<ReferencedEnvelope> keySet = tiles.keySet();
              for (ReferencedEnvelope env : keySet) {
                Tile tile = tiles.get(env);
                //System.out.println("BufferedImage: "+tile.getBufferedImage());
                ViewportModel viewportModelInternal = tile.getRenderExecutor().getRenderer().getContext().getViewportModelInternal();
                java.awt.Point a = viewportModelInternal.worldToPixel(new Coordinate(env.getMinX(), env.getMinY()));
                java.awt.Point b = viewportModelInternal.worldToPixel(new Coordinate(env.getMaxX(), env.getMaxY()));
                g.drawImage((RenderedImage)tile.getBufferedImage(), a.x, b.y);
                g.setColor(Color.BLUE);
                  g.drawLine(a.x, a.y, a.x, b.y);
                  g.drawLine(a.x, b.y, b.x, b.y);
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.ViewportModel.worldToPixel()

              for (ReferencedEnvelope env : keySet) {
                Tile tile = tiles.get(env);
                //System.out.println("BufferedImage: "+tile.getBufferedImage());
                ViewportModel viewportModelInternal = tile.getRenderExecutor().getRenderer().getContext().getViewportModelInternal();
                java.awt.Point a = viewportModelInternal.worldToPixel(new Coordinate(env.getMinX(), env.getMinY()));
                java.awt.Point b = viewportModelInternal.worldToPixel(new Coordinate(env.getMaxX(), env.getMaxY()));
                g.drawImage((RenderedImage)tile.getBufferedImage(), a.x, b.y);
                g.setColor(Color.BLUE);
                  g.drawLine(a.x, a.y, a.x, b.y);
                  g.drawLine(a.x, b.y, b.x, b.y);
                  g.drawLine(b.x, b.y, b.x, a.y);
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.impl.ViewportModelImpl.worldToPixel()

                        ViewportModelImpl vm =  (ViewportModelImpl)map.getViewportModel();
                        final ViewportPaneTiledSWT viewera = (ViewportPaneTiledSWT)viewer;
                        final ReferencedEnvelope bounds = vm.getBounds();
                        Coordinate currentc = vm.getCenter();
                     
                        final Point newpnt = vm.worldToPixel(newLoc);
                        final Point oldpnt = vm.worldToPixel(currentc);
                       
                        vm.setIsBoundsChanging(true);
                       
                        int xoffset =  oldpnt.x - newpnt.x;
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.impl.ViewportModelImpl.worldToPixel()

                        final ViewportPaneTiledSWT viewera = (ViewportPaneTiledSWT)viewer;
                        final ReferencedEnvelope bounds = vm.getBounds();
                        Coordinate currentc = vm.getCenter();
                     
                        final Point newpnt = vm.worldToPixel(newLoc);
                        final Point oldpnt = vm.worldToPixel(currentc);
                       
                        vm.setIsBoundsChanging(true);
                       
                        int xoffset =  oldpnt.x - newpnt.x;
                        int yoffset = oldpnt.y - newpnt.y;
View Full Code Here

Examples of org.locationtech.udig.project.render.IRenderContext.worldToPixel()

            Envelope envelope = getRenderBounds();
            if (envelope == null || envelope.isNull()) {
                envelope = context.getImageBounds();
            }

            Point upperLeft = currentContext.worldToPixel(new Coordinate(envelope.getMinX(), envelope.getMinY()));
            Point bottomRight = currentContext.worldToPixel(new Coordinate(envelope.getMaxX(), envelope.getMaxY()));
            Rectangle screenSize = new Rectangle(upperLeft);
            screenSize.add(bottomRight);

            final IGeoResource resource = getContext().getGeoResource();
View Full Code Here

Examples of org.locationtech.udig.project.render.IRenderContext.worldToPixel()

            if (envelope == null || envelope.isNull()) {
                envelope = context.getImageBounds();
            }

            Point upperLeft = currentContext.worldToPixel(new Coordinate(envelope.getMinX(), envelope.getMinY()));
            Point bottomRight = currentContext.worldToPixel(new Coordinate(envelope.getMaxX(), envelope.getMaxY()));
            Rectangle screenSize = new Rectangle(upperLeft);
            screenSize.add(bottomRight);

            final IGeoResource resource = getContext().getGeoResource();
            if (resource == null || !resource.canResolve(JGrassMapGeoResource.class)) {
View Full Code Here

Examples of org.locationtech.udig.project.render.IRenderContext.worldToPixel()

            //get the envelope and the screen extent
            ReferencedEnvelope envelope = getRenderBounds();
            if( envelope == null || envelope.isNull()){
                envelope = context.getImageBounds();
            }
            Point upperLeft = currentContext.worldToPixel( new Coordinate( envelope.getMinX(), envelope.getMinY()) );
            Point bottomRight = currentContext.worldToPixel( new Coordinate( envelope.getMaxX(), envelope.getMaxY()) );
            Rectangle screenSize = new Rectangle( upperLeft );
            screenSize.add( bottomRight );
          IMapDisplay mapDisplay = currentContext.getMapDisplay();
           
View Full Code Here

Examples of org.locationtech.udig.project.render.IRenderContext.worldToPixel()

            ReferencedEnvelope envelope = getRenderBounds();
            if( envelope == null || envelope.isNull()){
                envelope = context.getImageBounds();
            }
            Point upperLeft = currentContext.worldToPixel( new Coordinate( envelope.getMinX(), envelope.getMinY()) );
            Point bottomRight = currentContext.worldToPixel( new Coordinate( envelope.getMaxX(), envelope.getMaxY()) );
            Rectangle screenSize = new Rectangle( upperLeft );
            screenSize.add( bottomRight );
          IMapDisplay mapDisplay = currentContext.getMapDisplay();
           
          
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.