22#include <osl/mutex.hxx>
32 ::osl::Mutex* p_gdiPlusUsageCountMutex( osl::Mutex::getGlobalMutex() );
33 int n_gdiPlusUsageCount( 0 );
35 ULONG_PTR a_GdiPlusToken;
45 ::osl::MutexGuard aGuard( *p_gdiPlusUsageCountMutex );
47 --n_gdiPlusUsageCount;
49 if( n_gdiPlusUsageCount == 0 )
50 Gdiplus::GdiplusShutdown( a_GdiPlusToken );
55 ::osl::MutexGuard aGuard( *p_gdiPlusUsageCountMutex );
57 if( n_gdiPlusUsageCount == 0 )
63 Gdiplus::GdiplusStartupInput gdiPlusStartupInput;
65 Gdiplus::GdiplusStartup( &a_GdiPlusToken,
70 ++n_gdiPlusUsageCount;
static GDIPlusUserSharedPtr createInstance()
std::shared_ptr< GDIPlusUser > GDIPlusUserSharedPtr