+ " instead");
graphics.setColor( this.getGraphicsState().getNonStrokingColor().getJavaColor() );
}
PDFont font = text.getFont();
Matrix textPos = text.getTextPos().copy();
float x = textPos.getXPosition();
// the 0,0-reference has to be moved from the lower left (PDF) to the upper left (AWT-graphics)
float y = pageSize.height - textPos.getYPosition();
// Set translation to 0,0. We only need the scaling and shearing
textPos.setValue(2, 0, 0);
textPos.setValue(2, 1, 0);
// because of the moved 0,0-reference, we have to shear in the opposite direction
textPos.setValue(0, 1, (-1)*textPos.getValue(0, 1));
textPos.setValue(1, 0, (-1)*textPos.getValue(1, 0));
AffineTransform at = textPos.createAffineTransform();
PDMatrix fontMatrix = font.getFontMatrix();
at.scale(fontMatrix.getValue(0, 0) * 1000f, fontMatrix.getValue(1, 1) * 1000f);
graphics.setClip(getGraphicsState().getCurrentClippingPath());
// the fontSize is no longer needed as it is already part of the transformation
// we should remove it from the parameter list in the long run