Package org.locationtech.udig.ui.graphics

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


   
            //rgba = style.foregroundColor.getColorComponents(null);
            //g.setColor(new Color(rgba[0], rgba[1], rgba[2], style.fAlpha));
            graphic.setColor(new Color((float)0.5, (float)0.5, (float)0.5, (float)0.75));
            graphic.setStroke(ViewportGraphics.LINE_SOLID, 1);
            graphic.draw(path);
           
           
           
            // draw inner rings / holes
            if (innerPolygons != null) {
View Full Code Here


                    }
                    path.closePath();
                    graphic.setColor(new Color((float)0.5, (float)0.5, (float)0.5, (float)0.5));
                    graphic.fill(path);
                    graphic.setColor(new Color((float)0.5, (float)0.5, (float)0.5, (float)0.75));
                    graphic.draw(path);
                }
            }
           
        }
        context.getLayer().setStatus(ILayer.DONE);
View Full Code Here

            // for each location, create a circle and draw
            for (Coordinate location : coordinates) {
                Coordinate world = JTS.transform(location,  null, dataToWorldTransform);
                Point pixel = context.worldToPixel(world);
                Ellipse2D e = new Ellipse2D.Double(pixel.x - 4, pixel.y - 4, 10, 10);
                g.draw(e);
            }
        }
        catch (FactoryException unableToTransform){
            context.getLayer().setStatusMessage(unableToTransform.getMessage());
        } catch (TransformException outOfBounds) {
View Full Code Here

      left.addPoint(centerBase.x, centerBase.y);
      left.addPoint(tip.x, tip.y);
      left.addPoint(bottomLeft.x, bottomLeft.y);      
      g.setColor( Color.black );
      g.fill(left);
      g.draw(left);
     
      Polygon right = new Polygon();
      right.addPoint(centerBase.x, centerBase.y);
      right.addPoint(tip.x, tip.y);
      right.addPoint(bottomRight.x, bottomRight.y);
View Full Code Here

      right.addPoint(tip.x, tip.y);
      right.addPoint(bottomRight.x, bottomRight.y);
      g.setColor( Color.white );
      g.fill(right);
      g.setColor( Color.black );
      g.draw(right);

      //TODO: center the N properly.  presently it relies on the default font and font size
            // to be some particular values
            g.setColor(Color.BLACK);
            g.drawString("N", arrowCenterX-5, nTop, ViewportGraphics.ALIGN_LEFT, ViewportGraphics.ALIGN_MIDDLE); //$NON-NLS-1$
View Full Code Here

        g.fill(path);

        rgba = style.foregroundColor.getColorComponents(null);
        g.setColor(new Color(rgba[0], rgba[1], rgba[2], style.fAlpha));
        g.setStroke(ViewportGraphics.LINE_SOLID, 2);
        g.draw(path);

        context.getLayer().setStatus(ILayer.DONE);
        context.getLayer().setStatusMessage("Layer rendered");

    }
View Full Code Here

     for (Coordinate coordinate : coordinates) {
        Ellipse2D e = new Ellipse2D.Double(
                coordinate.x-4,
                coordinate.y-4,
                10,10);
        g.draw(e);
     }
}


}
View Full Code Here

            }

            rgba = style.foregroundColor.getColorComponents(null);
            g.setColor(new Color(rgba[0], rgba[1], rgba[2], style.fAlpha));
            g.setStroke(ViewportGraphics.LINE_SOLID, 2);
            g.draw(path);

            if (style.windPath != null) {
                File windFile = new File(style.windPath);
                if (windFile.exists()) {
                    File mapsetFile = windFile.getParentFile();
View Full Code Here

    for (ReferencedEnvelope referencedEnvelope : alerts) {
      Shape shape = context.toShape(referencedEnvelope);
      graphics.setColor(new Color(255,0,0,50));
      graphics.fill(shape);
      graphics.setColor(Color.RED);
      graphics.draw(shape);
    }
  }

}
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.