I found this code here: // System.out.println( "The bitmap is going to be painted!" ); XDevice xDevice = (XDevice)UnoRuntime.queryInterface( XDevice.class, m_xWindow ); if ( xDevice != null ) { // 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 ); }
// System.out.println( "Step3" ); xGraphics.drawLine( aRect.X - 1, aRect.Y - 1, aRect.X + aRect.Width + 1, aRect.Y - 1 ); xGraphics.drawLine( aRect.X + aRect.Width + 1, aRect.Y - 1, aRect.X + aRect.Width + 1, aRect.Y + aRect.Height + 1 ); xGraphics.drawLine( aRect.X + aRect.Width + 1, aRect.Y + aRect.Height + 1, aRect.X - 1, aRect.Y + aRect.Height + 1 ); xGraphics.drawLine( aRect.X - 1, aRect.Y + aRect.Height + 1, aRect.X - 1, aRect.Y - 1 ); ----- Is this how you draw to your "new" bitmap? Is it this command that says draw to this bitmap from now on? xGraphics.draw( xDisplayBitmap, 0, 0, aSize.Width, aSize.Height, aRect.X, aRect.Y, aRect.Width, aRect.Height ); So the next few lines that are drawn are drawn to the bitmap? Thanks in advance, the API on it was faily vague. http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XGraphics.html#draw Thanks once again!!! Chris -- View this message in context: http://www.nabble.com/Is-this-how-you-create-a-bitmap-image-from-using-xDevice.createDisplayBitmap-tp24372638p24372638.html Sent from the openoffice - dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org