25#include <com/sun/star/lang/NoSupportException.hpp>
55 rendering::XGraphicDevice& rDevice )
77 "DeviceHelper::getPhysicalResolution(): cannot retrieve HDC from window" );
79 const int nHorzRes( GetDeviceCaps( hDC,
81 const int nVertRes( GetDeviceCaps( hDC,
84 return geometry::RealSize2D( nHorzRes*25.4,
95 "DeviceHelper::getPhysicalSize(): cannot retrieve HDC from window" );
97 const int nHorzSize( GetDeviceCaps( hDC,
99 const int nVertSize( GetDeviceCaps( hDC,
102 return geometry::RealSize2D( nHorzSize,
107 const uno::Reference< rendering::XGraphicDevice >& ,
108 const uno::Sequence< uno::Sequence< geometry::RealPoint2D > >& points )
111 return uno::Reference< rendering::XLinePolyPolygon2D >();
113 return uno::Reference< rendering::XLinePolyPolygon2D >(
115 ::basegfx::unotools::polyPolygonFromPoint2DSequenceSequence( points ) ) );
119 const uno::Reference< rendering::XGraphicDevice >& ,
120 const uno::Sequence< uno::Sequence< geometry::RealBezierSegment2D > >& points )
123 return uno::Reference< rendering::XBezierPolyPolygon2D >();
125 return uno::Reference< rendering::XBezierPolyPolygon2D >(
127 ::basegfx::unotools::polyPolygonFromBezier2DSequenceSequence( points ) ) );
131 const uno::Reference< rendering::XGraphicDevice >& ,
132 const geometry::IntegerSize2D& size )
135 return uno::Reference< rendering::XBitmap >();
138 ::basegfx::unotools::b2ISizeFromIntegerSize2D(size),
142 return uno::Reference< rendering::XBitmap >(
new CanvasBitmap(pBitmap,
mpDevice));
146 const uno::Reference< rendering::XGraphicDevice >& ,
147 const geometry::IntegerSize2D& )
149 return uno::Reference< rendering::XVolatileBitmap >();
153 const uno::Reference< rendering::XGraphicDevice >& ,
154 const geometry::IntegerSize2D& size )
157 return uno::Reference< rendering::XBitmap >();
160 ::basegfx::unotools::b2ISizeFromIntegerSize2D(size),
164 return uno::Reference< rendering::XBitmap >(
new CanvasBitmap(pBitmap,
mpDevice));
168 const uno::Reference< rendering::XGraphicDevice >& ,
169 const geometry::IntegerSize2D& )
171 return uno::Reference< rendering::XVolatileBitmap >();
176 return css::uno::Any(
false);
reference_type * get() const
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileAlphaBitmap(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size)
css::geometry::RealSize2D getPhysicalSize()
css::uno::Any getSurfaceHandle() const
css::uno::Reference< css::rendering::XBitmap > createCompatibleBitmap(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size)
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileBitmap(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size)
css::uno::Reference< css::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > > &points)
css::uno::Reference< css::rendering::XBitmap > createCompatibleAlphaBitmap(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size)
void disposing()
Dispose all internal references.
css::uno::Reference< css::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > > &points)
VclPtr< OutputDevice > mpOutDev
void init(HDC hdc, OutputDevice *pOutputDev, css::rendering::XGraphicDevice &rDevice)
Init the device helper.
css::rendering::XGraphicDevice * mpDevice
Phyical output device.
css::uno::Any getDeviceHandle() const
css::uno::Any isAccelerated() const
css::uno::Reference< css::rendering::XColorSpace > getColorSpace() const
css::geometry::RealSize2D getPhysicalResolution()
#define ENSURE_OR_THROW(c, m)
sal::systools::COMReference< IDirect3DDevice9 > mpDevice
std::shared_ptr< DXBitmap > DXBitmapSharedPtr