/** * Appends a straight line segment from the current point <I>(x, y)</I>. The new current * point is <I>(x, y)</I>. * * @param x new x-coordinate * @param y new y-coordinate */ public void lineTo(final float x, final float y) { lineTo((double) x, (double) y); }
/** * Appends a straight line segment from the current point <I>(x, y)</I>. The new current * point is <I>(x, y)</I>. * * @param x new x-coordinate * @param y new y-coordinate */ public void lineTo(final float x, final float y) { lineTo((double) x, (double) y); }
PdfContentByte cb=bulidCellBorder(canvases,leftBorder); cb.moveTo(position.getLeft(), position.getTop()); cb.lineTo(position.getLeft(), position.getBottom()); cb.stroke(); if(leftBorder.getStyle().equals(BorderStyle.doublesolid)){ cb.moveTo(position.getLeft()+2, position.getTop()-2); cb.lineTo(position.getLeft()+2, position.getBottom()+2); cb.stroke(); PdfContentByte cb=bulidCellBorder(canvases,topBorder); cb.moveTo(position.getLeft(), position.getTop()); cb.lineTo(position.getRight(), position.getTop()); cb.stroke(); if(topBorder.getStyle().equals(BorderStyle.doublesolid)){ cb.moveTo(position.getLeft()+2, position.getTop()-2); cb.lineTo(position.getRight()-2, position.getTop()-2); cb.stroke(); PdfContentByte cb=bulidCellBorder(canvases,rightBorder); cb.moveTo(position.getRight(), position.getTop()); cb.lineTo(position.getRight(), position.getBottom()); cb.stroke(); if(rightBorder.getStyle().equals(BorderStyle.doublesolid)){ cb.moveTo(position.getRight()-2, position.getTop()-2); cb.lineTo(position.getRight()-2, position.getBottom()+2); cb.stroke(); PdfContentByte cb=bulidCellBorder(canvases,bottomBorder); cb.moveTo(position.getLeft(), position.getBottom());
private void drawRulerLine(PdfContentByte cb, int height) { cb.moveTo(59, height); cb.lineTo(536, height); cb.stroke(); }
float b = 0.4477f; moveTo(x + r, y); lineTo(x + w - r, y); curveTo(x + w - r * b, y, x + w, y + r * b, x + w, y + r); lineTo(x + w, y + h - r); curveTo(x + w, y + h - r * b, x + w - r * b, y + h, x + w - r, y + h); lineTo(x + r, y + h); curveTo(x + r * b, y + h, x, y + h - r * b, x, y + h - r); lineTo(x, y + r); curveTo(x, y + r * b, x + r * b, y, x + r, y);
float b = 0.4477f; moveTo(x + r, y); lineTo(x + w - r, y); curveTo(x + w - r * b, y, x + w, y + r * b, x + w, y + r); lineTo(x + w, y + h - r); curveTo(x + w, y + h - r * b, x + w - r * b, y + h, x + w - r, y + h); lineTo(x + r, y + h); curveTo(x + r * b, y + h, x, y + h - r * b, x, y + h - r); lineTo(x, y + r); curveTo(x, y + r * b, x + r * b, y, x + r, y);
final PdfContentByte cb = pdfTarget.getContentByte(); cb.moveTo(h.x1, -h.y1); cb.lineTo(h.x2, -h.y2); cb.setRGBColorStroke( color.getRed(),
setLineCap(0); moveTo(llx + 1f, lly + 1.5f); lineTo(urx - 1.5f, lly + 1.5f); lineTo(urx - 1.5f, ury - 1f); stroke(); setLineCap(0); moveTo(llx + 1f, lly + 1); lineTo(llx + 1f, ury - 1f); lineTo(urx - 1f, ury - 1f); stroke(); setLineCap(0); moveTo(llx + 2f, lly + 2f); lineTo(llx + 2f, ury - 2f); lineTo(urx - 2f, ury - 2f); stroke(); restoreState();
setLineCap(0); moveTo(llx + 1f, lly + 1.5f); lineTo(urx - 1.5f, lly + 1.5f); lineTo(urx - 1.5f, ury - 1f); stroke(); setLineCap(0); moveTo(llx + 1f, lly + 1); lineTo(llx + 1f, ury - 1f); lineTo(urx - 1f, ury - 1f); stroke(); setLineCap(0); moveTo(llx + 2f, lly + 2f); lineTo(llx + 2f, ury - 2f); lineTo(urx - 2f, ury - 2f); stroke(); restoreState();
cb.lineTo(coords[0], coords[1]); break;
canvas.setColorStroke(getLineColor()); canvas.moveTo(s + leftX, y + offset); canvas.lineTo(s + w + leftX, y + offset); canvas.stroke();
cb.lineTo(coords[0], coords[1]); break;
canvas.setColorStroke(getLineColor()); canvas.moveTo(s + leftX, y + offset); canvas.lineTo(s + w + leftX, y + offset); canvas.stroke();
public void drawFooter(PdfContentByte canvas, PageInfos pageInfos) { if (pageInfos.getRawPageNumber() == 1 && !footerOnFirstPage) return; if (drawLine) { BaseColor lineColor = styles.getColorOrDefault(HEADER_LINE_COLOR); canvas.saveState(); canvas.setColorStroke(lineColor); canvas.setLineWidth(1.2f); canvas.moveTo(rect.getLeft(), rect.getBottom() - 6); canvas.lineTo(rect.getRight(), rect.getBottom() - 6); canvas.stroke(); canvas.restoreState(); } float bottom = rect.getBottom() - 20; Phrase footer = footerText(pageInfos); if (footer != null) { showTextAligned(canvas, Element.ALIGN_LEFT, footer, rect.getLeft(), bottom, 0); } Font footerFont = styles.getFontOrDefault(FOOTER_FONT); Phrase page = new Phrase(pageInfos.getFormattedPageNumber(), footerFont); showTextAligned(canvas, Element.ALIGN_RIGHT, page, rect.getRight(), bottom, 0); }