main/sw/source/core/layout/paintfrm.cxx
/** OD 25.09.2002 #99739# - method to pixel-align rectangle for drawing graphic object

    Because for drawing a graphic left-top-corner and size coordinations are
    used, these coordinations have to be determined on pixel level.
    Thus, convert rectangle to pixel and then convert left-top-corner and
    size of pixel rectangle back to logic.
    This calculation is necessary, because there exists a different between
    the convert from logic to pixel of a normal rectangle with its left-top-
    and right-bottom-corner and the same convert of the same rectangle
    with left-top-corner and size.
    Call this method before each <GraphicObject.Draw(...)>

    @author OD
*/
OD 25.09.2002 #99739# - method to pixel-align rectangle for drawing graphic object
Because for drawing a graphic left-top-corner and size coordinations are
used, these coordinations have to be determined on pixel level.
Thus, convert rectangle to pixel and then convert left-top-corner and
size of pixel rectangle back to logic.
OD 25 . 09 . 2002 #99739# - method to pixel - align rectangle for drawing graphic object Because for drawing a graphic left - top - corner and size coordinations are used these coordinations have to be determined on pixel level . Thus convert rectangle to pixel and then convert left - top - corner and size of pixel rectangle back to logic .
void SwAlignGrfRect( SwRect *pGrfRect, const OutputDevice &rOut )
{
    Rectangle aPxRect = rOut.LogicToPixel( pGrfRect->SVRect() );
    pGrfRect->Pos( rOut.PixelToLogic( aPxRect.TopLeft() ) );
    pGrfRect->SSize( rOut.PixelToLogic( aPxRect.GetSize() ) );
}
void SwAlignGrfRect ( SwRect * pGrfRect , const OutputDevice & rOut ) { Rectangle aPxRect = rOut . LogicToPixel ( pGrfRect -> SVRect ( ) ) ; pGrfRect -> Pos ( rOut . PixelToLogic ( aPxRect . TopLeft ( ) ) ) ; pGrfRect -> SSize ( rOut . PixelToLogic ( aPxRect . GetSize ( ) ) ) ; }
OD 25.09.2002 #99739# - method to pixel-align rectangle for drawing graphic object
Because for drawing a graphic left-top-corner and size coordinations are
used, these coordinations have to be determined on pixel level.
OD 25 . 09 . 2002 #99739# - method to pixel - align rectangle for drawing graphic object Because for drawing a graphic left - top - corner and size coordinations are used these coordinations have to be determined on pixel level .