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

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

Best Java code snippets using com.itextpdf.text.pdf.PdfContentByte.concatCTM (Showing top 15 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/itextg

/**
 * Concatenate a matrix to the current transformation matrix.
 *
 * Common transformations:
 *
 * <ul>
 *   <li>Translation: [1 0 0 1 tx ty]</li>
 *   <li>Scaling: [sx 0 0 sy 0 0] (if sx or sy is negative, it will flip the coordinate system)</li>
 *   <li>Rotation: [cos(q) sin(q) -sin(q) cos(q) 0 0] where q is angle of counter-clockwise rotation (rotated around positive z-axis - use Right Hand Rule)
 *     <ul>
 *         <li>Rotate 90 degrees CCW: [0 1 -1 0 0 0]</li>
 *            <li>Rotate 180 degrees: [-1 0 0 -1 0 0]</li>
 *           <li>Rotate 270 degrees: [0 -1 1 0 0 0]</li>
 *   </li>
 *   <li>Skew: [1 tan(a) tan(b) 1 0 0] where a is x-axis skew angle and b is y-axis skew angle</li>
 *</ul>
 *
 * @param a an element of the transformation matrix
 * @param b an element of the transformation matrix
 * @param c an element of the transformation matrix
 * @param d an element of the transformation matrix
 * @param e an element of the transformation matrix
 * @param f an element of the transformation matrix
 **/
public void concatCTM(final float a, final float b, final float c, final float d, final float e, final float f) {
  concatCTM((double) a, (double) b, (double) c, (double) d, (double) e, (double) f);
}
origin: com.itextpdf/itextpdf

/**
 * Concatenate a matrix to the current transformation matrix.
 *
 * Common transformations:
 *
 * <ul>
 *   <li>Translation: [1 0 0 1 tx ty]</li>
 *   <li>Scaling: [sx 0 0 sy 0 0] (if sx or sy is negative, it will flip the coordinate system)</li>
 *   <li>Rotation: [cos(q) sin(q) -sin(q) cos(q) 0 0] where q is angle of counter-clockwise rotation (rotated around positive z-axis - use Right Hand Rule)
 *     <ul>
 *         <li>Rotate 90 degrees CCW: [0 1 -1 0 0 0]</li>
 *            <li>Rotate 180 degrees: [-1 0 0 -1 0 0]</li>
 *           <li>Rotate 270 degrees: [0 -1 1 0 0 0]</li>
 *   </li>
 *   <li>Skew: [1 tan(a) tan(b) 1 0 0] where a is x-axis skew angle and b is y-axis skew angle</li>
 *</ul>
 *
 * @param a an element of the transformation matrix
 * @param b an element of the transformation matrix
 * @param c an element of the transformation matrix
 * @param d an element of the transformation matrix
 * @param e an element of the transformation matrix
 * @param f an element of the transformation matrix
 **/
public void concatCTM(final float a, final float b, final float c, final float d, final float e, final float f) {
  concatCTM((double) a, (double) b, (double) c, (double) d, (double) e, (double) f);
}
origin: com.itextpdf/itextg

/**
 * Concatenate a matrix to the current transformation matrix.
 * @param transform added to the Current Transformation Matrix
 */
public void concatCTM(final AffineTransform transform) {
  double matrix[] = new double[6];
  transform.getMatrix(matrix);
  concatCTM(matrix[0], matrix[1], matrix[2],
      matrix[3], matrix[4], matrix[5]);
}
origin: com.itextpdf/itextpdf

/**
 * Concatenate a matrix to the current transformation matrix.
 * @param transform added to the Current Transformation Matrix
 */
public void concatCTM(final AffineTransform transform) {
  double matrix[] = new double[6];
  transform.getMatrix(matrix);
  concatCTM(matrix[0], matrix[1], matrix[2],
      matrix[3], matrix[4], matrix[5]);
}
origin: com.itextpdf/itextpdf

/**
 * Concatenate a matrix to the current transformation matrix.
 * @param transform added to the Current Transformation Matrix
 * @deprecated use com.itextpdf.text.geom.AffineTransform as parameter
 */
public void concatCTM(final java.awt.geom.AffineTransform transform) {
  double matrix[] = new double[6];
  transform.getMatrix(matrix);
  concatCTM(new AffineTransform(matrix));
}
origin: com.itextpdf/itextpdf

/**
 * @since    2.1.6 private is now protected
 */
protected void saveAndRotateCanvases(PdfContentByte[] canvases, float a, float b, float c, float d, float e, float f) {
  int last = PdfPTable.TEXTCANVAS + 1;
  if (canvasesPos == null) {
    canvasesPos = new int[last * 2];
  }
  for (int k = 0; k < last; ++k) {
    ByteBuffer bb = canvases[k].getInternalBuffer();
    canvasesPos[k * 2] = bb.size();
    canvases[k].saveState();
    canvases[k].concatCTM(a, b, c, d, e, f);
    canvasesPos[k * 2 + 1] = bb.size();
  }
}
origin: com.itextpdf/itextg

/**
 * @since    2.1.6 private is now protected
 */
protected void saveAndRotateCanvases(PdfContentByte[] canvases, float a, float b, float c, float d, float e, float f) {
  int last = PdfPTable.TEXTCANVAS + 1;
  if (canvasesPos == null) {
    canvasesPos = new int[last * 2];
  }
  for (int k = 0; k < last; ++k) {
    ByteBuffer bb = canvases[k].getInternalBuffer();
    canvasesPos[k * 2] = bb.size();
    canvases[k].saveState();
    canvases[k].concatCTM(a, b, c, d, e, f);
    canvasesPos[k * 2 + 1] = bb.size();
  }
}
origin: com.itextpdf/itextpdf

float cos = (float) Math.cos(alpha);
float sin = (float) Math.sin(alpha);
canvas.concatCTM(cos, sin, -sin, cos, x, y);
origin: com.itextpdf/itextg

float cos = (float) Math.cos(alpha);
float sin = (float) Math.sin(alpha);
canvas.concatCTM(cos, sin, -sin, cos, x, y);
origin: com.itextpdf/itextpdf

float ury = bf.getFontDescriptor(BaseFont.BBOXURY, fontSize);
cb.saveState();
cb.concatCTM(cos, sin, -sin, cos, refX, refY);
if ((align & MetaState.TA_CENTER) == MetaState.TA_CENTER)
  tx = -textWidth / 2;
origin: com.itextpdf/itextg

float ury = bf.getFontDescriptor(BaseFont.BBOXURY, fontSize);
cb.saveState();
cb.concatCTM(cos, sin, -sin, cos, refX, refY);
if ((align & MetaState.TA_CENTER) == MetaState.TA_CENTER)
  tx = -textWidth / 2;
origin: com.itextpdf/itextg

cb.restoreState();
cb.saveState();
cb.concatCTM(1, 0, 0, 1, eanR.getWidth() + n, eanR.getHeight() - ean.getBarHeight());
supp.placeBarcode(cb, barColor, textColor);
cb.restoreState();
origin: com.itextpdf/itextpdf

cb.restoreState();
cb.saveState();
cb.concatCTM(1, 0, 0, 1, eanR.getWidth() + n, eanR.getHeight() - ean.getBarHeight());
supp.placeBarcode(cb, barColor, textColor);
cb.restoreState();
origin: com.itextpdf/itextg

float w = image.getWidth();
float h = image.getHeight();
concatCTM(a / w, b / w, c / h, d / h, e, f);
rectangle(image);
restoreState();
origin: com.itextpdf/itextpdf

float w = image.getWidth();
float h = image.getHeight();
concatCTM(a / w, b / w, c / h, d / h, e, f);
rectangle(image);
restoreState();
com.itextpdf.text.pdfPdfContentByteconcatCTM

Javadoc

Concatenate a matrix to the current transformation matrix. Common transformations:
  • Translation: [1 0 0 1 tx ty]
  • Scaling: [sx 0 0 sy 0 0] (if sx or sy is negative, it will flip the coordinate system)
  • Rotation: [cos(q) sin(q) -sin(q) cos(q) 0 0] where q is angle of counter-clockwise rotation (rotated around positive z-axis - use Right Hand Rule)
    • Rotate 90 degrees CCW: [0 1 -1 0 0 0]
    • Rotate 180 degrees: [-1 0 0 -1 0 0]
    • Rotate 270 degrees: [0 -1 1 0 0 0]
  • Skew: [1 tan(a) tan(b) 1 0 0] where a is x-axis skew angle and b is y-axis skew angle

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).
  • moveTo
    Move the current point (x, y), omitting any connecting line segment.
  • 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.
  • stroke,
  • addImage,
  • setTextMatrix,
  • showText,
  • fill,
  • rectangle,
  • setColorFill,
  • setColorStroke,
  • setGState,
  • beginLayer

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
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