PdfPoint constrain(PdfPoint size) { final result = PdfPoint(constrainWidth(size.x), constrainHeight(size.y)); return result; }