Codota Logo
PdfContentByte.moveTo
Code IndexAdd Codota to your IDE (free)

How to use
moveTo
method
in
com.itextpdf.text.pdf.PdfContentByte

Best Java code snippets using com.itextpdf.text.pdf.PdfContentByte.moveTo (Showing top 20 results out of 315)

  • Common ways to obtain PdfContentByte
private void myMethod () {
PdfContentByte p =
  • Codota IconPdfWriter writer;writer.getDirectContent()
  • Codota IconPdfStamper pdfStamper;pdfStamper.getOverContent(pageNum)
  • Codota IconPdfStamper pdfStamper;pdfStamper.getUnderContent(pageNum)
  • Smart code suggestions by Codota
}
origin: com.itextpdf/itextpdf

/**
 * Move the current point <I>(x, y)</I>, omitting any connecting line segment.
 *
 * @param       x               new x-coordinate
 * @param       y               new y-coordinate
 */
public void moveTo(final float x, final float y) {
  moveTo((double) x, (double) y);
}
origin: com.itextpdf/itextg

/**
 * Move the current point <I>(x, y)</I>, omitting any connecting line segment.
 *
 * @param       x               new x-coordinate
 * @param       y               new y-coordinate
 */
public void moveTo(final float x, final float y) {
  moveTo((double) x, (double) y);
}
origin: youseries/ureport

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);
origin: grakic/jfreesteel

private void drawRulerLine(PdfContentByte cb, int height)
{
  cb.moveTo(59, height);
  cb.lineTo(536, height);
  cb.stroke();
}
origin: com.itextpdf/itextg

/**
 * Draws a partial ellipse inscribed within the rectangle x1,y1,x2,y2,
 * starting at startAng degrees and covering extent degrees. Angles
 * start with 0 to the right (+x) and increase counter-clockwise.
 *
 * @param x1 a corner of the enclosing rectangle
 * @param y1 a corner of the enclosing rectangle
 * @param x2 a corner of the enclosing rectangle
 * @param y2 a corner of the enclosing rectangle
 * @param startAng starting angle in degrees
 * @param extent angle extent in degrees
 */
public void arc(final double x1, final double y1, final double x2, final double y2, final double startAng, final double extent) {
  ArrayList<double[]> ar = bezierArc(x1, y1, x2, y2, startAng, extent);
  if (ar.isEmpty())
    return;
  double pt[] = ar.get(0);
  moveTo(pt[0], pt[1]);
  for (int k = 0; k < ar.size(); ++k) {
    pt = ar.get(k);
    curveTo(pt[2], pt[3], pt[4], pt[5], pt[6], pt[7]);
  }
}
origin: com.itextpdf/itextpdf

/**
 * Draws a partial ellipse inscribed within the rectangle x1,y1,x2,y2,
 * starting at startAng degrees and covering extent degrees. Angles
 * start with 0 to the right (+x) and increase counter-clockwise.
 *
 * @param x1 a corner of the enclosing rectangle
 * @param y1 a corner of the enclosing rectangle
 * @param x2 a corner of the enclosing rectangle
 * @param y2 a corner of the enclosing rectangle
 * @param startAng starting angle in degrees
 * @param extent angle extent in degrees
 */
public void arc(final double x1, final double y1, final double x2, final double y2, final double startAng, final double extent) {
  ArrayList<double[]> ar = bezierArc(x1, y1, x2, y2, startAng, extent);
  if (ar.isEmpty())
    return;
  double pt[] = ar.get(0);
  moveTo(pt[0], pt[1]);
  for (int k = 0; k < ar.size(); ++k) {
    pt = ar.get(k);
    curveTo(pt[2], pt[3], pt[4], pt[5], pt[6], pt[7]);
  }
}
origin: com.itextpdf/itextg

/** Draws a circle. The endpoint will (x+r, y).
 *
 * @param x x center of circle
 * @param y y center of circle
 * @param r radius of circle
 */
public void circle(final double x, final double y, final double r) {
  float b = 0.5523f;
  moveTo(x + r, y);
  curveTo(x + r, y + r * b, x + r * b, y + r, x, y + r);
  curveTo(x - r * b, y + r, x - r, y + r * b, x - r, y);
  curveTo(x - r, y - r * b, x - r * b, y - r, x, y - r);
  curveTo(x + r * b, y - r, x + r, y - r * b, x + r, y);
}
origin: com.itextpdf/itextpdf

/** Draws a circle. The endpoint will (x+r, y).
 *
 * @param x x center of circle
 * @param y y center of circle
 * @param r radius of circle
 */
public void circle(final double x, final double y, final double r) {
  float b = 0.5523f;
  moveTo(x + r, y);
  curveTo(x + r, y + r * b, x + r * b, y + r, x, y + r);
  curveTo(x - r * b, y + r, x - r, y + r * b, x - r, y);
  curveTo(x - r, y - r * b, x - r * b, y - r, x, y - r);
  curveTo(x + r * b, y - r, x + r, y - r * b, x + r, y);
}
origin: org.gephi/preview-plugin

final PDFTarget pdfTarget = (PDFTarget) target;
final PdfContentByte cb = pdfTarget.getContentByte();
cb.moveTo(h.x, -h.y);
cb.curveTo(h.v1.x, -h.v1.y, h.v2.x, -h.v2.y, h.x, -h.y);
cb.setRGBColorStroke(
origin: org.gephi/preview-plugin

final PDFTarget pdfTarget = (PDFTarget) target;
final PdfContentByte cb = pdfTarget.getContentByte();
cb.moveTo(h.p1.x, -h.p1.y);
cb.lineTo(h.p2.x, -h.p2.y);
cb.lineTo(h.p3.x, -h.p3.y);
origin: com.itextpdf/itextpdf

  r = -r;
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);
origin: com.itextpdf/itextg

  r = -r;
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);
origin: com.itextpdf/itextpdf

if (getLineColor() != null)
  canvas.setColorStroke(getLineColor());
canvas.moveTo(s + leftX, y + offset);
canvas.lineTo(s + w + leftX, y + offset);
canvas.stroke();
origin: com.itextpdf/itextg

if (getLineColor() != null)
  canvas.setColorStroke(getLineColor());
canvas.moveTo(s + leftX, y + offset);
canvas.lineTo(s + w + leftX, y + offset);
canvas.stroke();
origin: com.itextpdf/itextpdf

setLineWidth(1);
setLineCap(0);
moveTo(llx + 1f, lly + 1.5f);
lineTo(urx - 1.5f, lly + 1.5f);
lineTo(urx - 1.5f, ury - 1f);
setLineWidth(1);
setLineCap(0);
moveTo(llx + 1f, lly + 1);
lineTo(llx + 1f, ury - 1f);
lineTo(urx - 1f, ury - 1f);
setLineWidth(1);
setLineCap(0);
moveTo(llx + 2f, lly + 2f);
lineTo(llx + 2f, ury - 2f);
lineTo(urx - 2f, ury - 2f);
origin: com.itextpdf/itextg

setLineWidth(1);
setLineCap(0);
moveTo(llx + 1f, lly + 1.5f);
lineTo(urx - 1.5f, lly + 1.5f);
lineTo(urx - 1.5f, ury - 1f);
setLineWidth(1);
setLineCap(0);
moveTo(llx + 1f, lly + 1);
lineTo(llx + 1f, ury - 1f);
lineTo(urx - 1f, ury - 1f);
setLineWidth(1);
setLineCap(0);
moveTo(llx + 2f, lly + 2f);
lineTo(llx + 2f, ury - 2f);
lineTo(urx - 2f, ury - 2f);
origin: sc.fiji/Colocalisation_Analysis

cb.setLineWidth(1f);
if (isLetter) {
  cb.moveTo(PageSize.LETTER.getLeft(50), vertPos);
  cb.lineTo(PageSize.LETTER.getRight(50), vertPos);
} else {
  cb.moveTo(PageSize.A4.getLeft(50), vertPos);
  cb.lineTo(PageSize.A4.getRight(50), vertPos);
origin: org.technbolts/gutenberg

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);
}
origin: com.itextpdf/itextpdf

setLineWidth(1);
setLineCap(0);
moveTo(llx + 1f, lly + 1f);
lineTo(llx + 1f, ury - 1f);
lineTo(urx - 1f, ury - 1f);
setLineWidth(1);
setLineCap(0);
moveTo(llx + 1f, lly + 1f);
lineTo(urx - 1f, lly + 1f);
lineTo(urx - 1f, ury - 1f);
origin: com.itextpdf/itextg

setLineWidth(1);
setLineCap(0);
moveTo(llx + 1f, lly + 1f);
lineTo(llx + 1f, ury - 1f);
lineTo(urx - 1f, ury - 1f);
setLineWidth(1);
setLineCap(0);
moveTo(llx + 1f, lly + 1f);
lineTo(urx - 1f, lly + 1f);
lineTo(urx - 1f, ury - 1f);
com.itextpdf.text.pdfPdfContentBytemoveTo

Javadoc

Move the current point (x, y), omitting any connecting line segment.

Popular methods of PdfContentByte

  • addTemplate
    adds a template with the given matrix.
  • createTemplate
  • beginText
    Starts the writing of text.
  • endText
    Ends the writing of text and makes the current font invalid.
  • lineTo
    Appends a straight line segment from the current point (x, y). The new current point is (x, y).
  • restoreState
    Restores the graphic state. saveState andrestoreState must be balanced.
  • saveState
    Saves the graphic state. saveState andrestoreState must be balanced.
  • setFontAndSize
    Set the font and the size for the subsequent text writing.
  • setLineWidth
    Changes the line width. The line width specifies the thickness of the line used to stroke a path and
  • stroke
    Strokes the path.
  • addImage
    Adds an Image to the page. The Image must have absolute positioning. The image can be placed inline.
  • setTextMatrix
    Changes the text matrix.
  • addImage,
  • setTextMatrix,
  • showText,
  • fill,
  • rectangle,
  • setColorFill,
  • setColorStroke,
  • setGState,
  • beginLayer

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • runOnUiThread (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now