def _getContentArea(self): """ Based on the content size, in logical units, return, in device units, the rectangle encompassing the extents of the content to be drawn. """ drawingArea = self._getDrawingArea() scale = self._getScale(drawingArea) contentSize = self._getContentSize() * scale contentArea = Rect(drawingArea.x, drawingArea.y, contentSize.width, contentSize.height) contentArea = contentArea.CenterIn(drawingArea) return contentArea