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(); 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(); 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(); cb.moveTo(position.getLeft(), position.getBottom()); cb.lineTo(position.getRight(), position.getBottom()); cb.stroke(); if(bottomBorder.getStyle().equals(BorderStyle.doublesolid)){ cb.moveTo(position.getLeft()+2, position.getBottom()+2);
private void drawRulerLine(PdfContentByte cb, int height) { cb.moveTo(59, height); cb.lineTo(536, height); cb.stroke(); }
cb.setGState(gState); cb.stroke(); if (color.getAlpha() < 255) { cb.restoreState();
cb.setGState(gState); cb.stroke(); if (color.getAlpha() < 255) { cb.restoreState();
cb.setGState(gState); cb.stroke(); if (color.getAlpha() < 255) { cb.restoreState();
setColorStroke(new BaseColor(0xC0, 0xC0, 0xC0)); arc(llx + 1f, lly + 1f, urx - 1f, ury - 1f, 0f, 360f); stroke(); setColorStroke(new BaseColor(0xA0, 0xA0, 0xA0)); arc(llx + 0.5f, lly + 0.5f, urx - 0.5f, ury - 0.5f, 45, 180); stroke(); setColorStroke(new BaseColor(0x00, 0x00, 0x00)); arc(llx + 1.5f, lly + 1.5f, urx - 1.5f, ury - 1.5f, 45, 180); stroke(); if (on) {
setColorStroke(new BaseColor(0xC0, 0xC0, 0xC0)); arc(llx + 1f, lly + 1f, urx - 1f, ury - 1f, 0f, 360f); stroke(); setColorStroke(new BaseColor(0xA0, 0xA0, 0xA0)); arc(llx + 0.5f, lly + 0.5f, urx - 0.5f, ury - 0.5f, 45, 180); stroke(); setColorStroke(new BaseColor(0x00, 0x00, 0x00)); arc(llx + 1.5f, lly + 1.5f, urx - 1.5f, ury - 1.5f, 45, 180); stroke(); if (on) {
case STROKE: if (traces > 0) cb.stroke(); break; default: // drawType==CLIP
canvas.moveTo(s + leftX, y + offset); canvas.lineTo(s + w + leftX, y + offset); canvas.stroke();
canvas.moveTo(s + leftX, y + offset); canvas.lineTo(s + w + leftX, y + offset); canvas.stroke();
case STROKE: if (traces > 0) cb.stroke(); break; default: //drawType==CLIP
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(); 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(); 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(); cb.moveTo(position.getLeft(), position.getBottom()); cb.lineTo(position.getRight(), position.getBottom()); cb.stroke(); if(bottomBorder.getStyle().equals(BorderStyle.doublesolid)){ cb.moveTo(position.getLeft()+2, position.getBottom()+2);
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); }
cb.lineTo(PageSize.A4.getRight(50), vertPos); cb.stroke();