Examples of Rectangle


Examples of com.lowagie.text.Rectangle

     */ 
    public boolean setPageSize(Rectangle pageSize) {
        if (writer != null && writer.isPaused()) {
            return false;
        }
        nextPageSize = new Rectangle(pageSize);
        return true;
    }
View Full Code Here

Examples of com.lowagie.text.Rectangle

                        float subtract = lastBaseFactor;
                        if (nextChunk != null && nextChunk.isAttribute(Chunk.GENERICTAG))
                            subtract = 0;
                        if (nextChunk == null)
                            subtract += hangingCorrection;
                        Rectangle rect = new Rectangle(xMarker, yMarker, xMarker + width - subtract, yMarker + chunk.font().size());
                        PdfPageEvent pev = writer.getPageEvent();
                        if (pev != null)
                            pev.onGenericTag(writer, this, rect, (String)chunk.getAttribute(Chunk.GENERICTAG));
                    }
                    if (chunk.isAttribute(Chunk.PDFANNOTATION)) {
View Full Code Here

Examples of com.lowagie.text.Rectangle

                    }
                }
            }
           
      // we paint the graphics of the table after looping through all the cells
      Rectangle tablerec = new Rectangle(table);
      tablerec.setBorder(table.getBorder());
      tablerec.setBorderWidth(table.getBorderWidth());
      tablerec.setBorderColor(table.getBorderColor());
      tablerec.setBackgroundColor(table.getBackgroundColor());
      PdfContentByte under = writer.getDirectContentUnder();
      under.rectangle(tablerec.rectangle(top(), indentBottom()));
      under.add(ctx.cellGraphics);
      // bugfix by Gerald Fehringer: now again add the border for the table
      // since it might have been covered by cell backgrounds
      tablerec.setBackgroundColor(null);
      tablerec = tablerec.rectangle(top(), indentBottom());
      tablerec.setBorder(table.getBorder());
      under.rectangle(tablerec);
      // end bugfix

            ctx.cellGraphics = new PdfContentByte(null);
      // if the table continues on the next page
View Full Code Here

Examples of com.lowagie.text.Rectangle

            tx.setBorderWidth(0);
            tx.setSubstitutionFonts(substitutionFonts);
            decodeGenericDictionary(merged, tx);
            //rect
            PdfArray rect = (PdfArray)PdfReader.getPdfObject(merged.get(PdfName.RECT));
            Rectangle box = PdfReader.getNormalizedRectangle(rect);
            if (tx.getRotation() == 90 || tx.getRotation() == 270)
                box = box.rotate();
            tx.setBox(box);
            if (fieldCache != null)
                fieldCache.put(fieldName, tx);
        }
        else {
View Full Code Here

Examples of com.lowagie.text.Rectangle

            try {
                PdfDictionary wd = (PdfDictionary)item.widgets.get(k);
                PdfArray rect = (PdfArray)wd.get(PdfName.RECT);
                if (rect == null)
                    continue;
                Rectangle r = PdfReader.getNormalizedRectangle(rect);
                int page = ((Integer)item.page.get(k)).intValue();
                int rotation = reader.getPageRotation(page);
                ret[ptr++] = page;
                if (rotation != 0) {
                    Rectangle pageSize = reader.getPageSize(page);
                    switch (rotation) {
                        case 270:
                            r = new Rectangle(
                                pageSize.getTop() - r.getBottom(),
                                r.getLeft(),
                                pageSize.getTop() - r.getTop(),
                                r.getRight());
                            break;
                        case 180:
                            r = new Rectangle(
                                pageSize.getRight() - r.getLeft(),
                                pageSize.getTop() - r.getBottom(),
                                pageSize.getRight() - r.getRight(),
                                pageSize.getTop() - r.getTop());
                            break;
                        case 90:
                            r = new Rectangle(
                                r.getBottom(),
                                pageSize.getRight() - r.getLeft(),
                                r.getTop(),
                                pageSize.getRight() - r.getRight());
                            break;
                    }
                    r.normalize();
                }
                ret[ptr++] = r.getLeft();
View Full Code Here

Examples of com.lowagie.text.Rectangle

            Item item = getFieldItem(field);
            if (order >= item.merged.size())
                return null;
            int posi = order * 5;
            float[] pos = getFieldPositions(field);
            Rectangle box = new Rectangle(pos[posi + 1], pos[posi + 2], pos[posi + 3], pos[posi + 4]);
            PushbuttonField newButton = new PushbuttonField(writer, box, null);
            PdfDictionary dic = (PdfDictionary)item.merged.get(order);
            decodeGenericDictionary(dic, newButton);
            PdfDictionary mk = (PdfDictionary)PdfReader.getPdfObject(dic.get(PdfName.MK));
            if (mk != null) {
View Full Code Here

Examples of com.lowagie.text.Rectangle

               PdfFileSpecification fs;
               if (sparams[0])
                   fs = PdfFileSpecification.fileEmbedded(writer, fname, fname, null);
               else
                   fs = PdfFileSpecification.fileExtern(writer, fname);
               PdfAnnotation ann = PdfAnnotation.createScreen(writer, new Rectangle(annot.llx(), annot.lly(), annot.urx(), annot.ury()),
                       fname, fs, mimetype, sparams[1]);
               return ann;
           case Annotation.FILE_PAGE:
               return new PdfAnnotation(writer, annot.llx(), annot.lly(), annot.urx(), annot.ury(), new PdfAction((String) annot.attributes().get(Annotation.FILE), ((Integer) annot.attributes().get(Annotation.PAGE)).intValue()));
           case Annotation.NAMED_DEST:
View Full Code Here

Examples of com.sencha.gxt.core.client.util.Rectangle

      if (subMenu != null && subMenu.isVisible()) {
        Point xy = ce.<XEvent> cast().getXY();
        xy.setX(xy.getX() + XDOM.getBodyScrollLeft());
        xy.setY(xy.getY() + XDOM.getBodyScrollTop());

        Rectangle rec = subMenu.getElement().getBounds();
        if (getLayer(subMenu) != null) {
          Layer l = getLayer(subMenu);
          if (l.isShim() && l.isShadow()) {
            return !rec.contains(xy) && !l.getShadow().getBounds().contains(xy)
                && !l.getShim().getBounds().contains(xy);
          } else if (l.isShadow()) {
            return !rec.contains(xy) && !l.getShadow().getBounds().contains(xy);
          } else if (l.isShim()) {
            return !rec.contains(xy) && !l.getShim().getBounds().contains(xy);
          }
        }

        return !rec.contains(xy);
      }
    }
    return true;
  }
View Full Code Here

Examples of com.smartgwt.client.core.Rectangle

        pickListGrid.setCellFormatter(getSearchStrategy());
        pickListGrid.setShowHeader(false);
    }

    private void showPickListGrid() {
        Rectangle searchTextRect = searchTextItem.getPageRect();
        pickListGrid.setLeft(searchTextRect.getLeft());
        pickListGrid.setWidth(searchTextRect.getWidth());
        pickListGrid.setTop(searchTextRect.getTop() + searchTextRect.getHeight());
        pickListGrid.setHeight(PICKLIST_HEIGHT);
        pickListGrid.setWidth(PICKLIST_HEIGHT);
        pickListGrid.redraw();
    }
View Full Code Here

Examples of com.spatial4j.core.shape.Rectangle

      throw new RuntimeException("IOException thrown while executing query", ioe);
    }
  }

  protected Point randomPoint() {
    final Rectangle WB = ctx.getWorldBounds();
    return ctx.makePoint(
        randomIntBetween((int) WB.getMinX(), (int) WB.getMaxX()),
        randomIntBetween((int) WB.getMinY(), (int) WB.getMaxY()));
  }
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.