Hi all, 
Hi Christian and Herbert,
I have modify the code to change the PolyPolygon to a PolyPolygonvector to 
store the PolyPolygon.

if( bRTL || (nScriptType != ScriptType::LATIN) )                                
                                         
{                                                                               
                                         
     PolyPolygon aPolyPoygon;                                                   
                                      
     //the original code
     //mpVDev->GetTextOutline( aPolyPoygon, rText, 0, 0, (USHORT)nLen, TRUE, 
nWidth, pDXArray );                      
     //aPolyPoygon.Translate( rPos );                                           
                                      
     //Impl_writePolyPolygon( aPolyPoygon, sal_True, aTextColor, aTextColor );  
 
 
     //modified by fangyq 070528                                                
                                              
     PolyPolygonVector aPolyPolyVector;                                         
                                                                                
                                                                 
     mpVDev->GetTextOutlines( aPolyPolyVector, rText, 0, 0, (USHORT)nLen, TRUE, 
nWidth, pDXArray );                   
     PolyPolyVector::const_iterator aItPolyPolyVector = 
aPolyPolyVector.begin();                                      
     PolyPolygon aPolyPoly;                                                     
                                      
     for(; aItPolyPolyVector != aPolyPolyVector.end(); ++aItPolyPolyVector )    
                                      
     {                                                                          
                                      
          aPolyPoly = *aItPolyPolyVector;                                       
                                   
          aPolyPoly.Translate( rPos );                                          
                                   
          Impl_writePolyPolygon( aPolyPoly, sal_True, aTextColor, aTextColor ); 
                                   
     }                                                                          
                                                                                
                                                                                
                                                                                
                    
}

I invoke mpVDev->GetTextOutlines instead of GetTextOutline and modify the 
OutputDevice::GetTextOutlines() as below,

 ::basegfx::B2DPolyPolygonVector::const_iterator aIt = 
aB2DPolyPolyVector.begin();
 //the original code
 /*for(; aIt != aB2DPolyPolyVector.end(); ++aIt )
  rResultVector.push_back( *aIt );*/
 //modified by fangyq 070528 
 PolyPolyVector::const_iterator aItPolyPolyVector = rResultVector.begin();
 PolyPolygon aPolyPolygon;
 for(; aIt != aB2DPolyPolyVector.end(); ++aIt )
 {
      rResultVector.push_back( *aIt );
      for( unsigned int i = 0; i < aIt->count(); ++i )
      {
           aPolyPolygon = *aItPolyPolyVector;
           aPolyPolygon.Insert( (*aIt).getB2DPolygon( i ) );
      }
 }
 
Do you think it is ok to modify the OutputDevice::GetTextOutlines(), or I 
should remain it and define a new method.

Looking forward to your reply:)

Sincerely,
Fang



Fang Yaqiong [EMAIL PROTECTED]
2007-05-29
Regards&Thanks! 
Tel:010-5157-0010 Ext.6202 
Beijing Redflag CH2000 Software Co., Ltd. 

Reply via email to