separate getPixelRect and getLogicalRect functions