Examples of Shape


Examples of java.awt.Shape

        intersectionResultList.clear();
        repaint();
    }

    public OMGraphic getPointIntersectionImage(OMGraphic omg) {
        Shape s = omg.getShape();
        Projection p = getProjection();
        if (s != null && p != null && omg instanceof OMPoly) {
            Rectangle r = s.getBounds();

            double x = r.getX();
            double y = r.getY();
            double h = r.getHeight();
            double w = r.getWidth();
            float[] rawll = ((OMPoly) omg).getLatLonArray();
            LatLonPoint llHolder = new LatLonPoint();
            Geo g = new Geo(0, 0);
            int[] pix = new int[(int) (h * w)];

            for (double j = 0; j < h; j++) {
                for (double i = 0; i < w; i++) {

                    boolean inShape = s.contains(i + x, j + y);
                    p.inverse((int) (i + x), (int) (j + y), llHolder);

                    g.initialize(llHolder.getLatitude(), llHolder.getLongitude());
                    boolean inGeo = Intersection.isPointInPolygon(g,
                            rawll,
View Full Code Here

Examples of java.awt.Shape

  /**
   * @see Graphics2D#drawGlyphVector(GlyphVector, float, float)
   */
  public void drawGlyphVector(GlyphVector g, float x, float y) {
      Shape s = g.getOutline(x, y);
      fill(s);
  }
View Full Code Here

Examples of java.awt.Shape

    final double x = bounds.getX();
    final double y = bounds.getY();
    final double width = bounds.getWidth();
    final double height = bounds.getHeight();

    final Shape scaledShape = ShapeTransform.transformShape
        (shape, scale, keepAspectRatio, width, height);
    final Graphics2D clone = (Graphics2D) g2.create();
    final double extraPadding;
    if (layoutContext != null)
    {
View Full Code Here

Examples of java.awt.Shape

    }

    final double y = area.getCenterY();

    final Stroke outlineStroke = getOutlineStroke();
    final Shape defaultShape = getDefaultShape();

    g2.setPaint(getFillPaint());
    for (int i = 0; i < values.length; i++)
    {
      final Number n = values[i];
      if (n == null)
      {
        continue;
      }

      final double v = n.doubleValue();
      final double x = valueToJava2D(v, area);
      Shape valueShape = getShape(i);
      if (valueShape == null)
      {
        valueShape = defaultShape;
      }
      if (isShapeFilled(i))
View Full Code Here

Examples of java.awt.Shape

    helper.writeObject(borderPaint, out);
    final int size = shapes.size();
    out.writeInt(size);
    for (int i = 0; i < size; i++)
    {
      final Shape s = (Shape) shapes.get(i);
      helper.writeObject(s, out);
    }
  }
View Full Code Here

Examples of java.awt.Shape

    shapes = new ArrayList();

    final int size = in.readInt();
    for (int i = 0; i < size; i++)
    {
      final Shape s = (Shape) helper.readObject(in);
      shapes.add(s);
    }

  }
View Full Code Here

Examples of java.awt.Shape

      {
        processText(value, rawValue, parentRenderBox, element, stateKey);
      }
      else if (value instanceof Shape)
      {
        final Shape shape = (Shape) value;
        final ReportDrawable reportDrawable = new ShapeDrawable
            (shape, element.getStyle().getBooleanStyleProperty(ElementStyleKeys.KEEP_ASPECT_RATIO));
        final ProcessingContext processingContext = runtime.getProcessingContext();
        reportDrawable.setConfiguration(processingContext.getConfiguration());
        reportDrawable.setResourceBundleFactory(processingContext.getResourceBundleFactory());
View Full Code Here

Examples of java.awt.Shape

     * Return true of current bounds covers the projection area.
     */
    public boolean isOnMap(Projection proj) {
        OMRect bds = getBounds();
        bds.generate(proj);
        Shape s = bds.getShape();
        return s.intersects(0, 0, proj.getWidth(), proj.getHeight());
    }
View Full Code Here

Examples of java.awt.Shape

            if (DEBUG_SHAPE) {
                Debug.output("OMGraphicUtil.createShape3D():  adding shape...");
            }

            Shape shape = graphic.getShape();

            if (shape != null) {
                // Handle the shapes, depending on if they should
                // be filled or not...
View Full Code Here

Examples of java.awt.Shape

                        _popup.show(this,e.getX(),e.getY());
                    }

                } else if (isMouseButton2(e)){

                    Shape selectedShape = _elementContainer.getSelection().getSelectedShapeAt(_selX,_selY);
                    if (selectedShape instanceof ContextualDrawingProvider && getContextualDrawing()==null) {
                        setContextualDrawing(((ContextualDrawingProvider)selectedShape).getContextualDrawing(_elementContainer.getSelection()));
                        getContextualDrawing().consumeMouseEvent(e);
                    }
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.