LibreOffice Module canvas (master) 1
|
#include <cairo_devicehelper.hxx>
Public Member Functions | |
DeviceHelper (const DeviceHelper &)=delete | |
make noncopyable More... | |
const DeviceHelper & | operator= (const DeviceHelper &)=delete |
DeviceHelper () | |
void | init (SurfaceProvider &rSurfaceProvider, OutputDevice &rRefDevice) |
init helper More... | |
void | disposing () |
Dispose all internal references. More... | |
css::geometry::RealSize2D | getPhysicalResolution () |
css::geometry::RealSize2D | getPhysicalSize () |
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::XBezierPolyPolygon2D > | createCompatibleBezierPolyPolygon (const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > > &points) |
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::XBitmap > | createCompatibleAlphaBitmap (const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size) |
css::uno::Reference< css::rendering::XVolatileBitmap > | createVolatileAlphaBitmap (const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size) |
css::uno::Any | isAccelerated () const |
css::uno::Any | getDeviceHandle () const |
css::uno::Any | getSurfaceHandle () const |
css::uno::Reference< css::rendering::XColorSpace > const & | getColorSpace () const |
void | dumpScreenContent () const |
called when DumpScreenContent property is enabled on XGraphicDevice, and writes out bitmaps of current screen. More... | |
OutputDevice * | getOutputDevice () const |
const ::cairo::SurfaceSharedPtr & | getSurface () const |
::cairo::SurfaceSharedPtr | createSurface (const ::basegfx::B2ISize &rSize, int aContent) |
::cairo::SurfaceSharedPtr | createSurface (BitmapSystemData const &rData, const Size &rSize) |
Protected Member Functions | |
void | implInit (SurfaceProvider &rSurfaceProvider, OutputDevice &rRefDevice) |
init helper More... | |
void | setSize (const ::basegfx::B2ISize &rSize) |
Private Attributes | |
SurfaceProvider * | mpSurfaceProvider |
Surface provider. More... | |
VclPtr< OutputDevice > | mpRefDevice |
::cairo::SurfaceSharedPtr | mpSurface |
Definition at line 32 of file cairo_devicehelper.hxx.
|
delete |
make noncopyable
cairocanvas::DeviceHelper::DeviceHelper | ( | ) |
Definition at line 40 of file cairo_devicehelper.cxx.
css::uno::Reference< css::rendering::XBitmap > cairocanvas::DeviceHelper::createCompatibleAlphaBitmap | ( | const css::uno::Reference< css::rendering::XGraphicDevice > & | rDevice, |
const css::geometry::IntegerSize2D & | size | ||
) |
css::uno::Reference< css::rendering::XBezierPolyPolygon2D > cairocanvas::DeviceHelper::createCompatibleBezierPolyPolygon | ( | const css::uno::Reference< css::rendering::XGraphicDevice > & | rDevice, |
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > > & | points | ||
) |
css::uno::Reference< css::rendering::XBitmap > cairocanvas::DeviceHelper::createCompatibleBitmap | ( | const css::uno::Reference< css::rendering::XGraphicDevice > & | rDevice, |
const css::geometry::IntegerSize2D & | size | ||
) |
css::uno::Reference< css::rendering::XLinePolyPolygon2D > cairocanvas::DeviceHelper::createCompatibleLinePolyPolygon | ( | const css::uno::Reference< css::rendering::XGraphicDevice > & | rDevice, |
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > > & | points | ||
) |
SurfaceSharedPtr cairocanvas::DeviceHelper::createSurface | ( | BitmapSystemData const & | rData, |
const Size & | rSize | ||
) |
Definition at line 248 of file cairo_devicehelper.cxx.
References mpRefDevice.
SurfaceSharedPtr cairocanvas::DeviceHelper::createSurface | ( | const ::basegfx::B2ISize & | rSize, |
int | aContent | ||
) |
Definition at line 240 of file cairo_devicehelper.cxx.
References mpSurface.
css::uno::Reference< css::rendering::XVolatileBitmap > cairocanvas::DeviceHelper::createVolatileAlphaBitmap | ( | const css::uno::Reference< css::rendering::XGraphicDevice > & | rDevice, |
const css::geometry::IntegerSize2D & | size | ||
) |
css::uno::Reference< css::rendering::XVolatileBitmap > cairocanvas::DeviceHelper::createVolatileBitmap | ( | const css::uno::Reference< css::rendering::XGraphicDevice > & | rDevice, |
const css::geometry::IntegerSize2D & | size | ||
) |
void cairocanvas::DeviceHelper::disposing | ( | ) |
Dispose all internal references.
Definition at line 67 of file cairo_devicehelper.cxx.
References mpRefDevice, mpSurface, and mpSurfaceProvider.
void cairocanvas::DeviceHelper::dumpScreenContent | ( | ) | const |
called when DumpScreenContent property is enabled on XGraphicDevice, and writes out bitmaps of current screen.
Definition at line 219 of file cairo_devicehelper.cxx.
References mpRefDevice, and WriteDIB().
uno::Reference< rendering::XColorSpace > const & cairocanvas::DeviceHelper::getColorSpace | ( | ) | const |
Definition at line 212 of file cairo_devicehelper.cxx.
References vcl::unotools::createStandardColorSpace(), and SPACE.
uno::Any cairocanvas::DeviceHelper::getDeviceHandle | ( | ) | const |
Definition at line 202 of file cairo_devicehelper.cxx.
References VclPtr< class reference_type >::get(), and mpRefDevice.
Referenced by cairocanvas::SpriteDeviceHelper::getDeviceHandle().
|
inline |
Definition at line 89 of file cairo_devicehelper.hxx.
References mpRefDevice.
Referenced by cairocanvas::SpriteDeviceHelper::createSurface(), init(), and setSize().
geometry::RealSize2D cairocanvas::DeviceHelper::getPhysicalResolution | ( | ) |
Definition at line 100 of file cairo_devicehelper.cxx.
References mpRefDevice, and vcl::unotools::size2DFromSize().
geometry::RealSize2D cairocanvas::DeviceHelper::getPhysicalSize | ( | ) |
Definition at line 111 of file cairo_devicehelper.cxx.
References canvas::tools::createInfiniteSize2D(), mpRefDevice, and vcl::unotools::size2DFromSize().
|
inline |
Definition at line 90 of file cairo_devicehelper.hxx.
References mpSurface.
Referenced by cairocanvas::SpriteDeviceHelper::getWindowSurface().
uno::Any cairocanvas::DeviceHelper::getSurfaceHandle | ( | ) | const |
Definition at line 207 of file cairo_devicehelper.cxx.
Referenced by cairocanvas::SpriteDeviceHelper::getSurfaceHandle().
|
protected |
init helper
rCanvas | Owning canvas. |
rRefDevice | Reference output device. Needed for resolution calculations etc. |
Definition at line 46 of file cairo_devicehelper.cxx.
References mpRefDevice, and mpSurfaceProvider.
Referenced by init().
void cairocanvas::DeviceHelper::init | ( | SurfaceProvider & | rSurfaceProvider, |
OutputDevice & | rRefDevice | ||
) |
init helper
rCanvas | Owning canvas. |
rRefDevice | Reference output device. Needed for resolution calculations etc. |
Definition at line 55 of file cairo_devicehelper.cxx.
References OutputDevice::CreateSurface(), OutputDevice::GetOutOffXPixel(), OutputDevice::GetOutOffYPixel(), getOutputDevice(), OutputDevice::GetOutputHeightPixel(), OutputDevice::GetOutputWidthPixel(), implInit(), and mpSurface.
Referenced by cairocanvas::SpriteDeviceHelper::init().
uno::Any cairocanvas::DeviceHelper::isAccelerated | ( | ) | const |
Definition at line 197 of file cairo_devicehelper.cxx.
|
delete |
|
protected |
Definition at line 75 of file cairo_devicehelper.cxx.
References OutputDevice::CreateSurface(), OutputDevice::GetOutOffXPixel(), OutputDevice::GetOutOffYPixel(), getOutputDevice(), mpRefDevice, mpSurface, and SAL_INFO.
Referenced by cairocanvas::SpriteDeviceHelper::setSize().
|
private |
Definition at line 117 of file cairo_devicehelper.hxx.
Referenced by createSurface(), disposing(), dumpScreenContent(), getDeviceHandle(), getOutputDevice(), getPhysicalResolution(), getPhysicalSize(), implInit(), and setSize().
|
private |
Definition at line 118 of file cairo_devicehelper.hxx.
Referenced by createSurface(), disposing(), getSurface(), init(), and setSize().
|
private |
Surface provider.
Deliberately not a refcounted reference, because of potential circular references for canvas. Provides us with our output surface and associated functionality.
Definition at line 115 of file cairo_devicehelper.hxx.
Referenced by disposing(), and implInit().