LibreOffice Module canvas (master)  1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
cairocanvas::DeviceHelper Class Reference

#include <cairo_devicehelper.hxx>

Inheritance diagram for cairocanvas::DeviceHelper:
[legend]
Collaboration diagram for cairocanvas::DeviceHelper:
[legend]

Public Member Functions

 DeviceHelper (const DeviceHelper &)=delete
 make noncopyable More...
 
const DeviceHelperoperator= (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...
 
OutputDevicegetOutputDevice () const
 
const ::cairo::SurfaceSharedPtrgetSurface () 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

SurfaceProvidermpSurfaceProvider
 Surface provider. More...
 
VclPtr< OutputDevicempRefDevice
 
::cairo::SurfaceSharedPtr mpSurface
 

Detailed Description

Definition at line 35 of file cairo_devicehelper.hxx.

Constructor & Destructor Documentation

cairocanvas::DeviceHelper::DeviceHelper ( const DeviceHelper )
delete

make noncopyable

cairocanvas::DeviceHelper::DeviceHelper ( )

Definition at line 42 of file cairo_devicehelper.cxx.

Member Function Documentation

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 ( const ::basegfx::B2ISize rSize,
int  aContent 
)

Definition at line 254 of file cairo_devicehelper.cxx.

References mpSurface.

SurfaceSharedPtr cairocanvas::DeviceHelper::createSurface ( BitmapSystemData const &  rData,
const Size rSize 
)

Definition at line 262 of file cairo_devicehelper.cxx.

References OutputDevice::CreateBitmapSurface(), and mpRefDevice.

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 70 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 233 of file cairo_devicehelper.cxx.

References OutputDevice::EnableMapMode(), OutputDevice::GetBitmapEx(), OutputDevice::GetOutputSizePixel(), OutputDevice::IsMapModeEnabled(), mpRefDevice, and WriteDIB().

uno::Reference< rendering::XColorSpace > const & cairocanvas::DeviceHelper::getColorSpace ( ) const

Definition at line 227 of file cairo_devicehelper.cxx.

uno::Any cairocanvas::DeviceHelper::getDeviceHandle ( ) const
OutputDevice* cairocanvas::DeviceHelper::getOutputDevice ( ) const
inline

Definition at line 92 of file cairo_devicehelper.hxx.

References mpRefDevice.

Referenced by cairocanvas::SpriteDeviceHelper::createSurface(), init(), and setSize().

geometry::RealSize2D cairocanvas::DeviceHelper::getPhysicalResolution ( )
geometry::RealSize2D cairocanvas::DeviceHelper::getPhysicalSize ( )
const ::cairo::SurfaceSharedPtr& cairocanvas::DeviceHelper::getSurface ( ) const
inline

Definition at line 93 of file cairo_devicehelper.hxx.

References mpSurface.

Referenced by cairocanvas::SpriteDeviceHelper::getWindowSurface().

uno::Any cairocanvas::DeviceHelper::getSurfaceHandle ( ) const
void cairocanvas::DeviceHelper::implInit ( SurfaceProvider rSurfaceProvider,
OutputDevice rRefDevice 
)
protected

init helper

Parameters
rCanvasOwning canvas.
rRefDeviceReference output device. Needed for resolution calculations etc.

Definition at line 49 of file cairo_devicehelper.cxx.

References mpRefDevice, and mpSurfaceProvider.

Referenced by init().

void cairocanvas::DeviceHelper::init ( SurfaceProvider rSurfaceProvider,
OutputDevice rRefDevice 
)

init helper

Parameters
rCanvasOwning canvas.
rRefDeviceReference output device. Needed for resolution calculations etc.

Definition at line 58 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 200 of file cairo_devicehelper.cxx.

const DeviceHelper& cairocanvas::DeviceHelper::operator= ( const DeviceHelper )
delete
void cairocanvas::DeviceHelper::setSize ( const ::basegfx::B2ISize rSize)
protected

Member Data Documentation

VclPtr<OutputDevice> cairocanvas::DeviceHelper::mpRefDevice
private
::cairo::SurfaceSharedPtr cairocanvas::DeviceHelper::mpSurface
private

Definition at line 121 of file cairo_devicehelper.hxx.

Referenced by createSurface(), disposing(), getSurface(), init(), and setSize().

SurfaceProvider* cairocanvas::DeviceHelper::mpSurfaceProvider
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 118 of file cairo_devicehelper.hxx.

Referenced by disposing(), and implInit().


The documentation for this class was generated from the following files: