39 case QPaintDevice::PdmWidth:
40 return mDrawingSize.width();
41 case QPaintDevice::PdmHeight:
42 return mDrawingSize.height();
43 case QPaintDevice::PdmWidthMM:
44 return mDrawingSize.width();
45 case QPaintDevice::PdmHeightMM:
46 return mDrawingSize.height();
47 case QPaintDevice::PdmNumColors:
49 case QPaintDevice::PdmDepth:
51 case QPaintDevice::PdmDpiX:
52 case QPaintDevice::PdmDpiY:
53 case QPaintDevice::PdmPhysicalDpiX:
54 case QPaintDevice::PdmPhysicalDpiY:
62 if ( !mDrawingSize.isValid() || mRectangle.isEmpty() )
67 double widthFactor = mRectangle.width() / mDrawingSize.width();
68 double heightFactor = mRectangle.height() / mDrawingSize.height();
69 return ( widthFactor + heightFactor ) / 2.0;
74 if ( !mDrawingSize.isValid() || mRectangle.isEmpty() )
76 return QPointF( pt.x(), pt.y() );
79 double x = mRectangle.left() + pt.x() * ( mRectangle.width() / mDrawingSize.width() );
80 double y = mRectangle.bottom() - pt.y() * ( mRectangle.height() / mDrawingSize.height() );
81 return QPointF( x, y );