31 struct GraphicsDeleter
33 sal::systools::COMReference<surface_type>
mpSurface;
36 GraphicsDeleter(
const sal::systools::COMReference<surface_type>& rSurface, HDC hdc) :
41 void operator()( Gdiplus::Graphics* pGraphics )
46 pGraphics->Flush(Gdiplus::FlushIntentionSync);
59 if( SUCCEEDED(rSurface->GetDC( &aHDC )) )
61 Gdiplus::Graphics* pGraphics = Gdiplus::Graphics::FromHDC( aHDC );
66 GraphicsDeleter(rSurface, aHDC));
70 rSurface->ReleaseDC( aHDC );
73 throw uno::RuntimeException(
"could not get the DC to rSurface");
sal::systools::COMReference< surface_type > mpSurface
std::shared_ptr< Gdiplus::Graphics > GraphicsSharedPtr
GraphicsSharedPtr createSurfaceGraphics(const sal::systools::COMReference< surface_type > &rSurface)
Container providing a Gdiplus::Graphics for a Surface.