1 31 package org.pdfbox.util.operator; 32 33 import java.util.List ; 34 import org.pdfbox.cos.COSNumber; 35 import org.pdfbox.util.Matrix; 36 import org.pdfbox.util.PDFOperator; 37 38 49 50 public class Concatenate extends OperatorProcessor 51 { 52 53 58 public void process(PDFOperator operator, List arguments) 59 { 60 61 COSNumber a = (COSNumber) arguments.get(0); 63 COSNumber b = (COSNumber) arguments.get(1); 64 COSNumber c = (COSNumber) arguments.get(2); 65 COSNumber d = (COSNumber) arguments.get(3); 66 COSNumber e = (COSNumber) arguments.get(4); 67 COSNumber f = (COSNumber) arguments.get(5); 68 69 Matrix newMatrix = new Matrix(); 70 newMatrix.setValue(0, 0, a.floatValue()); 71 newMatrix.setValue(0, 1, b.floatValue()); 72 newMatrix.setValue(1, 0, c.floatValue()); 73 newMatrix.setValue(1, 1, d.floatValue()); 74 newMatrix.setValue(2, 0, e.floatValue()); 75 newMatrix.setValue(2, 1, f.floatValue()); 76 77 context.getGraphicsState().setCurrentTransformationMatrix( 79 newMatrix.multiply( context.getGraphicsState().getCurrentTransformationMatrix() ) ); 80 81 } 82 } | Popular Tags |