+void Builder::addSubBitmap( const BuilderData::SubBitmap &rData )
+{
+ // Get the parent bitmap
+ GenericBitmap *pParentBmp = NULL;
+ GET_BMP( pParentBmp, rData.m_parent );
+ if( !pParentBmp )
+ {
+ msg_Err( getIntf(), "unknown bitmap id: %s", rData.m_parent.c_str() );
+ return;
+ }
+
+ // Copy a region of the parent bitmap to the new one
+ BitmapImpl *pBmp =
+ new BitmapImpl( getIntf(), rData.m_width, rData.m_height );
+ pBmp->drawBitmap( *pParentBmp, rData.m_x, rData.m_y, 0, 0, rData.m_width,
+ rData.m_height );
+
+ m_pTheme->m_bitmaps[rData.m_id] = GenericBitmapPtr( pBmp );
+}
+
+