/** * 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); }
/** * 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); }
/** * 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]); }
/** * 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]); }
/** * 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)); }
/** * @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(); } }
/** * @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(); } }
float cos = (float) Math.cos(alpha); float sin = (float) Math.sin(alpha); canvas.concatCTM(cos, sin, -sin, cos, x, y);
float cos = (float) Math.cos(alpha); float sin = (float) Math.sin(alpha); canvas.concatCTM(cos, sin, -sin, cos, x, y);
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;
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;
cb.restoreState(); cb.saveState(); cb.concatCTM(1, 0, 0, 1, eanR.getWidth() + n, eanR.getHeight() - ean.getBarHeight()); supp.placeBarcode(cb, barColor, textColor); cb.restoreState();
cb.restoreState(); cb.saveState(); cb.concatCTM(1, 0, 0, 1, eanR.getWidth() + n, eanR.getHeight() - ean.getBarHeight()); supp.placeBarcode(cb, barColor, textColor); cb.restoreState();
float w = image.getWidth(); float h = image.getHeight(); concatCTM(a / w, b / w, c / h, d / h, e, f); rectangle(image); restoreState();
float w = image.getWidth(); float h = image.getHeight(); concatCTM(a / w, b / w, c / h, d / h, e, f); rectangle(image); restoreState();