Package org.locationtech.udig.ui.graphics

Examples of org.locationtech.udig.ui.graphics.ViewportGraphics.drawLine()


            Point startPoint = (Point) start.getObject();
            Point endPoint = (Point) end.getObject();           
            java.awt.Point startPixel = context.worldToPixel( startPoint.getCoordinate() );
            java.awt.Point endPixel = context.worldToPixel( endPoint.getCoordinate() );

            graphics.drawLine(startPixel.x, startPixel.y, endPixel.x, endPixel.y);           
        }
        graphics.setColor( Color.YELLOW );
        graphics.setLineWidth(2);
        for( Edge edge : path ){
            Object obj = edge.getObject();
View Full Code Here


            Point startPoint = (Point) start.getObject();
            Point endPoint = (Point) end.getObject();           
            java.awt.Point startPixel = context.worldToPixel( startPoint.getCoordinate() );
            java.awt.Point endPixel = context.worldToPixel( endPoint.getCoordinate() );

            graphics.drawLine(startPixel.x, startPixel.y, endPixel.x, endPixel.y);           
        }
        for( Node node : waypoints ){
            Point point = (Point) node.getObject();
            java.awt.Point pixel = context.worldToPixel( point.getCoordinate() );
           
View Full Code Here

       
        int x=0,y=0;
       
        while( x<width){
            x+=dx;
            g.drawLine(x, 0, x, height);
        }
       
        while ( y<height ){
            y+=dy;
            g.drawLine(0, y, width, y);
View Full Code Here

            g.drawLine(x, 0, x, height);
        }
       
        while ( y<height ){
            y+=dy;
            g.drawLine(0, y, width, y);
        }
       
    }

    /**
 
View Full Code Here

            }
            if( (pixel.x>=context.getMapDisplay().getWidth() && pixel.y>=context.getMapDisplay().getHeight()) )
                break;
           
            if( pixel.x<context.getMapDisplay().getWidth())
                graphics.drawLine(pixel.x,0,pixel.x,context.getMapDisplay().getHeight());
            if( pixel.y<context.getMapDisplay().getHeight())
                graphics.drawLine(0, pixel.y,context.getMapDisplay().getWidth(),pixel.y);
            pixel=next;
        }
    }
View Full Code Here

                break;
           
            if( pixel.x<context.getMapDisplay().getWidth())
                graphics.drawLine(pixel.x,0,pixel.x,context.getMapDisplay().getHeight());
            if( pixel.y<context.getMapDisplay().getHeight())
                graphics.drawLine(0, pixel.y,context.getMapDisplay().getWidth(),pixel.y);
            pixel=next;
        }
    }

    /**
 
View Full Code Here

            if( (pixel.x>=mapPixelWidth && pixel.y>=mapPixelHeight) )
                break;
           
            //draw vertical lines and labels
            if( pixel.x<mapPixelWidth)
                graphics.drawLine(pixel.x,
                                  0,
                                  pixel.x,
                                  mapPixelHeight - BOTTOM_STRIP_HEIGHT + GRID_LINE_EXTENSION);
                if (showLabels) {
                    graphics.drawString( String.valueOf( (int) coord.y ),
View Full Code Here

                                    ViewportGraphics.ALIGN_TOP);
                }
           
            //draw horizontal lines and labels
            if( pixel.y<mapPixelHeight)
                graphics.drawLine(0,
                                  pixel.y,
                                  mapPixelWidth - RIGHT_STRIP_WIDTH + GRID_LINE_EXTENSION,
                                  pixel.y);
                if (showLabels) {
                    graphics.drawString( String.valueOf( (int)coord.x) ,
View Full Code Here

                Point thisPixel = context.worldToPixel(thisCoord);

                //ticks along left and right
                if (i == 0) {
                    //draw left-most ticks
                    graphics.drawLine(EDGE_WIDTH,
                            thisPixel.y,
                            EDGE_WIDTH + TICK_WIDTH,
                            thisPixel.y);
                   
                    //draw right-most ticks
View Full Code Here

                            thisPixel.y,
                            EDGE_WIDTH + TICK_WIDTH,
                            thisPixel.y);
                   
                    //draw right-most ticks
                    graphics.drawLine(mapPixelWidth - EDGE_WIDTH,
                            thisPixel.y,
                            mapPixelWidth - EDGE_WIDTH - TICK_WIDTH,
                            thisPixel.y);
                   
                }
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.