// System.out.println( "Step1" );
XGraphics xGraphics = xDevice.createGraphics();
if ( xBitmap != null )
{
// System.out.println( "Step2" );
XDisplayBitmap xDisplayBitmap = xDevice.createDisplayBitmap( xBitmap );
com.sun.star.awt.Size aSize = xBitmap.getSize();
xGraphics.draw( xDisplayBitmap, 0, 0, aSize.Width, aSize.Height,
aRect.X, aRect.Y, aRect.Width, aRect.Height );
}