Package java.awt

Examples of java.awt.Shape.intersects()


            overall.height += 1;
           
            Rectangle bounds = new Rectangle(overall);
            bounds.width += 1;
            bounds.height += 1;
            if (working.intersects(bounds)) {
                page.paintBackground(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
                page.paintMarginAreas(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
                page.paintBorder(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
               
                Color old = g.getColor();
View Full Code Here


        Shape gridShape = grid.getShape();

        // Don't generate the raster if the grid is off-map...
        if (gridShape == null
                || !gridShape.intersects(0,
                        0,
                        proj.getWidth(),
                        proj.getHeight())) {
            if (Debug.debugging("grid")) {
                Debug.output("SlopeGenerator: OMGrid does not overlap map, skipping generation.");
View Full Code Here

     */
    public boolean isOnMap(Projection proj) {
        OMRect bds = getBounds();
        bds.generate(proj);
        Shape s = bds.getShape();
        return s.intersects(0, 0, proj.getWidth(), proj.getHeight());
    }

    public boolean validScale(Projection proj) {
        if (proj instanceof EqualArc) {
            EqualArc ea = (EqualArc) proj;
View Full Code Here

      {
        JRPrintElement element = (JRPrintElement)it.next();
       
        if (
          (filter != null && !filter.isToExport(element))
          || !clipArea.intersects(
            element.getX() + elementOffset.getX() - ELEMENT_RECTANGLE_PADDING,
            element.getY() + elementOffset.getY() - ELEMENT_RECTANGLE_PADDING,
            element.getWidth() + 2 * ELEMENT_RECTANGLE_PADDING,
            element.getHeight() + 2 * ELEMENT_RECTANGLE_PADDING)
          )
 
View Full Code Here

                                oldOpImage.mapDestRect(dstRect, idx);
                            if(srcRect == null) {
                                gp = null;
                                break;
                            }
                            if(srcInvalidRegion.intersects(srcRect)) {
                                if(gp == null) {
                                    gp = new GeneralPath(dstRect);
                                } else {
                                    gp.append(dstRect, false);
                                }
View Full Code Here

    final BasicStroke stroke = getStroke();
    final Shape sh        = LNumber.equalsDouble(shape.getRotationAngle(), 0.) ? path : getRotatedShape2D();

    if(stroke==null)
      return sh.intersects(rec) || sh.contains(rec);

    return shape.isFilled() && sh.contains(rec) || stroke.createStrokedShape(sh).intersects(rec);
  }

View Full Code Here

      return false;

    final Shape sh = getRotatedShape2D(shape.getRotationAngle(), border,
            ShapeFactory.createPoint(border.getMinX(), border.getMinY()),
            ShapeFactory.createPoint(border.getMaxX(), border.getMaxY()));
    return sh.contains(rec) || sh.intersects(rec);
  }


  @Override
  public boolean contains(final double x, final double y) {
View Full Code Here

                                oldPISP.mapDestRect(dstRect, idx);
                            if(srcRect == null) {
                                gp = null;
                                break;
                            }
                            if(srcInvalidRegion.intersects(srcRect)) {
                                if(gp == null) {
                                    gp = new GeneralPath(dstRect);
                                } else {
                                    gp.append(dstRect, false);
                                }
View Full Code Here

                        obj.getY() + bounds.y * myMap.getTileHeight(),
                        obj.getWidth() > 0 ? obj.getWidth() : zoom,
                        obj.getHeight() > 0 ? obj.getHeight() : zoom);
            }

            if (shape.intersects(mouse)) {
                return obj;
            }
        }

        return null;
View Full Code Here

            else if (orientation == PlotOrientation.VERTICAL) {
                shape = ShapeUtilities.createTranslatedShape(shape, transX,
                        transY);
            }
            hotspot = shape;
            if (shape.intersects(dataArea)) {
                //if (getItemShapeFilled(series, item)) {
                    g2.setPaint(getPaint(dataset, series, item));
                    g2.fill(shape);
               //}
                if (this.drawOutlines) {
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.