Examples of toShape()


Examples of com.vividsolutions.jts.awt.ShapeWriter.toShape()

            if(error != null) {
                graphics.drawString(error.getMessage(), 0, imageDimenions.height/2);
            }
            ShapeWriter shapeWriter = new ShapeWriter();
            AffineTransform worldToScreenTransform = worldToScreenTransform(bboxOfImage, imageDimenions);
            Shape shape = worldToScreenTransform.createTransformedShape(shapeWriter.toShape(geom));
            graphics.setColor(Color.yellow);
            graphics.draw(shape);

            graphics.setColor(new Color(255, 255, 0, 100));
            graphics.fill(shape);
View Full Code Here

Examples of com.vividsolutions.jts.awt.ShapeWriter.toShape()

                                             @Nullable final AreaOfInterest areaOfInterest,
                                             @Nonnull final Graphics2D graphics2D) {
        if (areaOfInterest != null && areaOfInterest.display == AreaOfInterest.AoiDisplay.CLIP) {
            final Polygon screenGeometry = areaOfInterestInScreenCRS(transformer, areaOfInterest);
            final ShapeWriter shapeWriter = new ShapeWriter();
            final Shape clipShape = shapeWriter.toShape(screenGeometry);
            return new ConstantClipGraphics2D(graphics2D, clipShape);
        }

        return graphics2D;
    }
View Full Code Here

Examples of com.vividsolutions.jts.awt.ShapeWriter.toShape()

            OffsetCurveBuilder offsetBuilder = new OffsetCurveBuilder(new PrecisionModel(),
                    bufParams);
            Coordinate[] coords = offsetBuilder.getOffsetCurve(midLineGeom.getCoordinates(),
                    lineWidth * 0.4);
            LineString offsetLine = geomFactory.createLineString(coords);
            Shape midLineShape = shapeWriter.toShape(midLineGeom);
            Shape offsetShape = shapeWriter.toShape(offsetLine);

            context.graphics.setStroke(hasGeom ? halfStroke : halfDashedStroke);
            context.graphics.setColor(evAttrs.color);
            context.graphics.draw(offsetShape);
View Full Code Here

Examples of com.vividsolutions.jts.awt.ShapeWriter.toShape()

                    bufParams);
            Coordinate[] coords = offsetBuilder.getOffsetCurve(midLineGeom.getCoordinates(),
                    lineWidth * 0.4);
            LineString offsetLine = geomFactory.createLineString(coords);
            Shape midLineShape = shapeWriter.toShape(midLineGeom);
            Shape offsetShape = shapeWriter.toShape(offsetLine);

            context.graphics.setStroke(hasGeom ? halfStroke : halfDashedStroke);
            context.graphics.setColor(evAttrs.color);
            context.graphics.draw(offsetShape);
            if (lineWidth > 6.0f) {
View Full Code Here

Examples of com.vividsolutions.jts.awt.ShapeWriter.toShape()

            boolean render = evRenderer.renderVertex(vertex, vvAttrs);
            if (!render)
                continue;

            Point tilePoint = (Point) context.transform.transform(point);
            Shape shape = shapeWriter.toShape(tilePoint);

            context.graphics.setColor(vvAttrs.color);
            context.graphics.setStroke(stroke);
            context.graphics.draw(shape);
            if (vvAttrs.label != null && lineWidth > 6.0f
View Full Code Here

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

      public void visit(RenderExecutor executor) {
        IRenderContext context = executor.getContext();
        if (selectionLayer == context.getLayer()) {
          executor.getRenderer().setRenderBounds(bounds);
          if (bounds != null) {
            Rectangle bounds2 = context.toShape(
                new ReferencedEnvelope(bounds,
                    getViewportModelInternal().getCRS()))
                .getBounds();
            context.clearImage(bounds2);
          } else {
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.PrimitiveShapeIterator.toShape()

           
        ILayer editLayer = handler.getEditLayer();
        List<EditGeom> geoms = handler.getEditBlackboard(editLayer).getGeoms();
        for( EditGeom geom : geoms ) {
            PrimitiveShapeIterator iter=PrimitiveShapeIterator.getPathIterator(geom.getShell());
            if( iter.toShape().contains(e.x,e.y) ){
                if (cycleGeom) {
                    if (selectedFound) { //first match after the currently selected one
                        return geom.getShell();
                    }
                    if (geom == handler.getCurrentGeom()) { //currently selected geom
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.PrimitiveShapeIterator.toShape()

    private int countOnBlackboard( EditToolHandler handler, MapMouseEvent e ) {
        List<EditGeom> geoms = handler.getEditBlackboard(handler.getEditLayer()).getGeoms();
        int count = 0;
        for( EditGeom geom : geoms ) {
            PrimitiveShapeIterator iter=PrimitiveShapeIterator.getPathIterator(geom.getShell());
            if( iter.toShape().contains(e.x,e.y) ){
                count++;
            }
        }
        return count;
    }
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.