/** * add a line to the current path. * * @param xStart The start x coordinate. * @param yStart The start y coordinate. * @param xEnd The end x coordinate. * @param yEnd The end y coordinate. * @throws IOException If there is an error while adding the line. * @throws IllegalStateException If the method was called within a text block. * @deprecated Use {@link #moveTo moveto(xStart,yStart)} followed by * {@link #lineTo lineTo(xEnd,yEnd)}. */ @Deprecated public void addLine(float xStart, float yStart, float xEnd, float yEnd) throws IOException { if (inTextMode) { throw new IllegalStateException("Error: addLine is not allowed within a text block."); } moveTo(xStart, yStart); lineTo(xEnd, yEnd); }
/** * Draw a line on the page using the current stroking color and the current line width. * * @param xStart The start x coordinate. * @param yStart The start y coordinate. * @param xEnd The end x coordinate. * @param yEnd The end y coordinate. * @throws IOException If there is an error while drawing on the screen. * @throws IllegalStateException If the method was called within a text block. * @deprecated Use {@link #moveTo moveto(xStart,yStart)} followed by * {@link #lineTo lineTo(xEnd,yEnd)} followed by {@link #stroke stroke()}. */ @Deprecated public void drawLine(float xStart, float yStart, float xEnd, float yEnd) throws IOException { if (inTextMode) { throw new IllegalStateException("Error: drawLine is not allowed within a text block."); } moveTo(xStart, yStart); lineTo(xEnd, yEnd); stroke(); }
lineTo(x[i], y[i]);
contentStream.lineTo(startX-2, startY+200+fontSize); contentStream.stroke(); contentStream.lineTo(startX+100+stringWidth+2, startY+200+fontSize); contentStream.stroke(); contentStream.lineTo(startX+100+stringWidth+2, startY-2); contentStream.stroke(); contentStream.lineTo(startX-2, startY-2); contentStream.stroke();
public void lineTo(float x1, float y1) { try { cs.lineTo(x1, y1); } catch (IOException e) { logAndThrow("lineTo", e); } }
public void lineTo(float x1, float y1) { try { cs.lineTo(x1, y1); } catch (IOException e) { logAndThrow("lineTo", e); } }
/** * add a line to the current path. * * @param xStart The start x coordinate. * @param yStart The start y coordinate. * @param xEnd The end x coordinate. * @param yEnd The end y coordinate. * @throws IOException If there is an error while adding the line. * @throws IllegalStateException If the method was called within a text block. * @deprecated Use {@link #moveTo moveto(xStart,yStart)} followed by * {@link #lineTo lineTo(xEnd,yEnd)}. */ @Deprecated public void addLine(float xStart, float yStart, float xEnd, float yEnd) throws IOException { if (inTextMode) { throw new IllegalStateException("Error: addLine is not allowed within a text block."); } moveTo(xStart, yStart); lineTo(xEnd, yEnd); }
/** * Draw a line on the page using the current stroking color and the current line width. * * @param xStart The start x coordinate. * @param yStart The start y coordinate. * @param xEnd The end x coordinate. * @param yEnd The end y coordinate. * @throws IOException If there is an error while drawing on the screen. * @throws IllegalStateException If the method was called within a text block. * @deprecated Use {@link #moveTo moveto(xStart,yStart)} followed by * {@link #lineTo lineTo(xEnd,yEnd)} followed by {@link #stroke stroke()}. */ @Deprecated public void drawLine(float xStart, float yStart, float xEnd, float yEnd) throws IOException { if (inTextMode) { throw new IllegalStateException("Error: drawLine is not allowed within a text block."); } moveTo(xStart, yStart); lineTo(xEnd, yEnd); stroke(); }
private void drawLine( PDPageContentStream content, float xstart, float ystart, float xend, float yend ){ content.moveTo(xstart, ystart); // moves "pencil" to a position content.lineTo(xend, yend); // creates an invisible line to another position content.stroke(); // makes the line visible }
/** * add a line to the current path. * * @param xStart The start x coordinate. * @param yStart The start y coordinate. * @param xEnd The end x coordinate. * @param yEnd The end y coordinate. * @throws IOException If there is an error while adding the line. * @throws IllegalStateException If the method was called within a text block. * @deprecated Use {@link #moveTo moveto(xStart,yStart)} followed by * {@link #lineTo lineTo(xEnd,yEnd)}. */ @Deprecated public void addLine(float xStart, float yStart, float xEnd, float yEnd) throws IOException { if (isInTextMode()) { throw new IllegalStateException("Error: addLine is not allowed within a text block."); } moveTo(xStart, yStart); lineTo(xEnd, yEnd); }
lineTo(x[i], y[i]);
/** * Draw a line on the page using the current stroking color and the current line width. * * @param xStart The start x coordinate. * @param yStart The start y coordinate. * @param xEnd The end x coordinate. * @param yEnd The end y coordinate. * @throws IOException If there is an error while drawing on the screen. * @throws IllegalStateException If the method was called within a text block. * @deprecated Use {@link #moveTo moveto(xStart,yStart)} followed by * {@link #lineTo lineTo(xEnd,yEnd)} followed by {@link #stroke stroke()}. */ @Deprecated public void drawLine(float xStart, float yStart, float xEnd, float yEnd) throws IOException { if (isInTextMode()) { throw new IllegalStateException("Error: drawLine is not allowed within a text block."); } moveTo(xStart, yStart); lineTo(xEnd, yEnd); stroke(); }
lineTo(x[i], y[i]);
private void drawLine(float xStart, float yStart, float xEnd, float yEnd, LineStyle border) throws IOException { PDStreamUtils.setLineStyles(tableContentStream, border); tableContentStream.moveTo(xStart, yStart); tableContentStream.lineTo(xEnd, yEnd); tableContentStream.stroke(); tableContentStream.closePath(); }
case PathIterator.SEG_LINETO: if (isFinite(coords, 2)) contentStream.lineTo(coords[0], coords[1]); break; case PathIterator.SEG_QUADTO:
float titleWidth = font.getStringWidth(line) / 1000 * fontSize; stream.moveTo(textX, y); stream.lineTo(textX + titleWidth, y); stream.stroke(); } catch (final IOException e) {
@Override public void commit(PDPageContentStream stream) throws IOException { stream.setStrokingColor(style.color()); stream.setLineWidth(toFloat(style.width())); stream.moveTo(toFloat(x1), toFloat(y1)); stream.lineTo(toFloat(x2), toFloat(y2)); stream.stroke(); } }
contentStream.lineTo(startX-2, startY+200+fontSize); contentStream.stroke(); contentStream.lineTo(startX+100+stringWidth+2, startY+200+fontSize); contentStream.stroke(); contentStream.lineTo(startX+100+stringWidth+2, startY-2); contentStream.stroke(); contentStream.lineTo(startX-2, startY-2); contentStream.stroke();