use of com.tom_roush.pdfbox.cos.COSNumber in project PdfBox-Android by TomRoush.
the class SetTextRise method process.
@Override
public void process(Operator operator, List<COSBase> arguments) throws IOException {
if (arguments.isEmpty()) {
return;
}
COSBase base = arguments.get(0);
if (!(base instanceof COSNumber)) {
return;
}
COSNumber rise = (COSNumber) base;
context.getGraphicsState().getTextState().setRise(rise.floatValue());
}
use of com.tom_roush.pdfbox.cos.COSNumber in project PdfBox-Android by TomRoush.
the class SetWordSpacing method process.
@Override
public void process(Operator operator, List<COSBase> arguments) {
if (arguments.isEmpty()) {
return;
}
COSBase base = arguments.get(0);
if (!(base instanceof COSNumber)) {
return;
}
COSNumber wordSpacing = (COSNumber) base;
context.getGraphicsState().getTextState().setWordSpacing(wordSpacing.floatValue());
}
use of com.tom_roush.pdfbox.cos.COSNumber in project PdfBox-Android by TomRoush.
the class Concatenate method process.
@Override
public void process(Operator operator, List<COSBase> arguments) throws IOException {
if (arguments.size() < 6) {
throw new MissingOperandException(operator, arguments);
}
if (!checkArrayTypesClass(arguments, COSNumber.class)) {
return;
}
// concatenate matrix to current transformation matrix
COSNumber a = (COSNumber) arguments.get(0);
COSNumber b = (COSNumber) arguments.get(1);
COSNumber c = (COSNumber) arguments.get(2);
COSNumber d = (COSNumber) arguments.get(3);
COSNumber e = (COSNumber) arguments.get(4);
COSNumber f = (COSNumber) arguments.get(5);
Matrix matrix = new Matrix(a.floatValue(), b.floatValue(), c.floatValue(), d.floatValue(), e.floatValue(), f.floatValue());
context.getGraphicsState().getCurrentTransformationMatrix().concatenate(matrix);
}
use of com.tom_roush.pdfbox.cos.COSNumber in project PdfBox-Android by TomRoush.
the class SetFlatness method process.
@Override
public void process(Operator operator, List<COSBase> operands) throws IOException {
if (operands.isEmpty()) {
throw new MissingOperandException(operator, operands);
}
if (!checkArrayTypesClass(operands, COSNumber.class)) {
return;
}
COSNumber value = (COSNumber) operands.get(0);
context.getGraphicsState().setFlatness(value.floatValue());
}
use of com.tom_roush.pdfbox.cos.COSNumber in project PdfBox-Android by TomRoush.
the class SetLineMiterLimit method process.
@Override
public void process(Operator operator, List<COSBase> arguments) throws IOException {
if (arguments.isEmpty()) {
throw new MissingOperandException(operator, arguments);
}
COSNumber miterLimit = (COSNumber) arguments.get(0);
context.getGraphicsState().setMiterLimit(miterLimit.floatValue());
}
Aggregations