code: protected float[] transformPosition(float x, float y)
      {
          Point2D.Float point = super.transformedPoint(x, y);
          AffineTransform pageTransform = createCurrentPageTransformation();
          Point2D.Float transformedPoint = (Point2D.Float) pageTransform.transform(point, null);
  
          return new float[]{(float) transformedPoint.getX(), (float) transformedPoint.getY()};
      }
docs: Transforms a position according to the current transformation matrix and current page transformation.
  @param x
  @param y
  @return