emf+-use-canvas-only-for-emf+.diff: emf+ import
- use canvas rendering only for emf+
This commit is contained in:
parent
a529db20d6
commit
f59b7f5482
3 changed files with 15 additions and 3 deletions
|
@ -2230,6 +2230,7 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
|
|||
mem << one << zero << zero << one << zero << zero;
|
||||
|
||||
mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const BYTE*) mem.GetData(), mem.GetEndOfData() ) );
|
||||
mpGDIMetaFile->UseCanvas( TRUE );
|
||||
}
|
||||
|
||||
void WinMtfOutput::PassEMFPlus( void* pBuffer, UINT32 nLength )
|
||||
|
|
|
@ -107,6 +107,7 @@ private:
|
|||
ImpLabelList* pLabelList;
|
||||
BOOL bPause;
|
||||
BOOL bRecord;
|
||||
BOOL bUseCanvas;
|
||||
|
||||
//#if 0 // _SOLAR__PRIVATE
|
||||
|
||||
|
@ -246,6 +247,8 @@ public:
|
|||
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile );
|
||||
|
||||
BOOL CreateThumbnail( sal_uInt32 nMaximumExtent, BitmapEx& rBmpEx, const BitmapEx* pOverlay = NULL, const Rectangle* pOverlayRect = NULL ) const;
|
||||
|
||||
void UseCanvas( BOOL _bUseCanvas );
|
||||
};
|
||||
|
||||
#endif // _SV_GDIMTF_HXX
|
||||
|
|
|
@ -212,7 +212,8 @@ GDIMetaFile::GDIMetaFile() :
|
|||
pOutDev ( NULL ),
|
||||
pLabelList ( NULL ),
|
||||
bPause ( FALSE ),
|
||||
bRecord ( FALSE )
|
||||
bRecord ( FALSE ),
|
||||
bUseCanvas ( FALSE )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -227,7 +228,8 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
|
|||
pNext ( rMtf.pNext ),
|
||||
pOutDev ( NULL ),
|
||||
bPause ( FALSE ),
|
||||
bRecord ( FALSE )
|
||||
bRecord ( FALSE ),
|
||||
bUseCanvas ( rMtf.bUseCanvas )
|
||||
{
|
||||
// RefCount der MetaActions erhoehen
|
||||
for( void* pAct = First(); pAct; pAct = Next() )
|
||||
|
@ -281,6 +283,7 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
|
|||
pOutDev = NULL;
|
||||
bPause = FALSE;
|
||||
bRecord = FALSE;
|
||||
bUseCanvas = rMtf.bUseCanvas;
|
||||
|
||||
if( rMtf.bRecord )
|
||||
{
|
||||
|
@ -568,7 +571,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
|
|||
{
|
||||
GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
|
||||
|
||||
if( !pMtf && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
|
||||
if( bUseCanvas && !pMtf && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
|
||||
return;
|
||||
|
||||
Size aTmpPrefSize( pOut->LogicToPixel( GetPrefSize(), aDrawMap ) );
|
||||
|
@ -3117,3 +3120,8 @@ BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
|
|||
|
||||
return !rBmpEx.IsEmpty();
|
||||
}
|
||||
|
||||
void GDIMetaFile::UseCanvas( BOOL _bUseCanvas )
|
||||
{
|
||||
bUseCanvas = _bUseCanvas;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue