package com.tom_roush.pdfbox.contentstream.operator.text;
import com.tom_roush.pdfbox.contentstream.operator.MissingOperandException;
import com.tom_roush.pdfbox.contentstream.operator.Operator;
import com.tom_roush.pdfbox.contentstream.operator.OperatorProcessor;
import com.tom_roush.pdfbox.cos.COSBase;
import com.tom_roush.pdfbox.cos.COSNumber;
import java.io.IOException;
import java.util.List;
/**
* Tz: Set horizontal text scaling.
*
* @author Ben Litchfield
*/
public class SetTextHorizontalScaling extends OperatorProcessor
{
@Override
public void process(Operator operator, List<COSBase> arguments) throws IOException
{
if (arguments.size() < 1)
{
throw new MissingOperandException(operator, arguments);
}
COSNumber scaling = (COSNumber) arguments.get(0);
context.getGraphicsState().getTextState().setHorizontalScaling(scaling.floatValue());
}
@Override
public String getName()
{
return "Tz";
}
}