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

SurfaceProvider * mpSurfaceProvider
 Surface provider. More...
 
VclPtr< OutputDevicempRefDevice
 
::cairo::SurfaceSharedPtr mpSurface
 

Detailed Description

Definition at line 32 of file cairo_devicehelper.hxx.

Constructor & Destructor Documentation

◆ DeviceHelper() [1/2]

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

make noncopyable

◆ DeviceHelper() [2/2]

cairocanvas::DeviceHelper::DeviceHelper ( )

Definition at line 40 of file cairo_devicehelper.cxx.

Member Function Documentation

◆ createCompatibleAlphaBitmap()

css::uno::Reference< css::rendering::XBitmap > cairocanvas::DeviceHelper::createCompatibleAlphaBitmap ( const css::uno::Reference< css::rendering::XGraphicDevice > &  rDevice,
const css::geometry::IntegerSize2D &  size 
)

◆ createCompatibleBezierPolyPolygon()

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 
)

◆ createCompatibleBitmap()

css::uno::Reference< css::rendering::XBitmap > cairocanvas::DeviceHelper::createCompatibleBitmap ( const css::uno::Reference< css::rendering::XGraphicDevice > &  rDevice,
const css::geometry::IntegerSize2D &  size 
)

◆ createCompatibleLinePolyPolygon()

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 
)

◆ createSurface() [1/2]

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

Definition at line 248 of file cairo_devicehelper.cxx.

References mpRefDevice.

◆ createSurface() [2/2]

SurfaceSharedPtr cairocanvas::DeviceHelper::createSurface ( const ::basegfx::B2ISize rSize,
int  aContent 
)

Definition at line 240 of file cairo_devicehelper.cxx.

References mpSurface.

◆ createVolatileAlphaBitmap()

css::uno::Reference< css::rendering::XVolatileBitmap > cairocanvas::DeviceHelper::createVolatileAlphaBitmap ( const css::uno::Reference< css::rendering::XGraphicDevice > &  rDevice,
const css::geometry::IntegerSize2D &  size 
)

◆ createVolatileBitmap()

css::uno::Reference< css::rendering::XVolatileBitmap > cairocanvas::DeviceHelper::createVolatileBitmap ( const css::uno::Reference< css::rendering::XGraphicDevice > &  rDevice,
const css::geometry::IntegerSize2D &  size 
)

◆ disposing()

void cairocanvas::DeviceHelper::disposing ( )

Dispose all internal references.

Definition at line 67 of file cairo_devicehelper.cxx.

References mpRefDevice, mpSurface, and mpSurfaceProvider.

◆ dumpScreenContent()

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().

◆ getColorSpace()

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

Definition at line 212 of file cairo_devicehelper.cxx.

References vcl::unotools::createStandardColorSpace(), and SPACE.

◆ getDeviceHandle()

uno::Any cairocanvas::DeviceHelper::getDeviceHandle ( ) const

◆ getOutputDevice()

OutputDevice * cairocanvas::DeviceHelper::getOutputDevice ( ) const
inline

Definition at line 89 of file cairo_devicehelper.hxx.

References mpRefDevice.

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

◆ getPhysicalResolution()

geometry::RealSize2D cairocanvas::DeviceHelper::getPhysicalResolution ( )

Definition at line 100 of file cairo_devicehelper.cxx.

References mpRefDevice, and vcl::unotools::size2DFromSize().

◆ getPhysicalSize()

geometry::RealSize2D cairocanvas::DeviceHelper::getPhysicalSize ( )

◆ getSurface()

const ::cairo::SurfaceSharedPtr & cairocanvas::DeviceHelper::getSurface ( ) const
inline

Definition at line 90 of file cairo_devicehelper.hxx.

References mpSurface.

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

◆ getSurfaceHandle()

uno::Any cairocanvas::DeviceHelper::getSurfaceHandle ( ) const

◆ implInit()

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

References mpRefDevice, and mpSurfaceProvider.

Referenced by init().

◆ 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 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().

◆ isAccelerated()

uno::Any cairocanvas::DeviceHelper::isAccelerated ( ) const

Definition at line 197 of file cairo_devicehelper.cxx.

◆ operator=()

const DeviceHelper & cairocanvas::DeviceHelper::operator= ( const DeviceHelper )
delete

◆ setSize()

void cairocanvas::DeviceHelper::setSize ( const ::basegfx::B2ISize rSize)
protected

Member Data Documentation

◆ mpRefDevice

VclPtr<OutputDevice> cairocanvas::DeviceHelper::mpRefDevice
private

◆ mpSurface

::cairo::SurfaceSharedPtr cairocanvas::DeviceHelper::mpSurface
private

Definition at line 118 of file cairo_devicehelper.hxx.

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

◆ mpSurfaceProvider

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 115 of file cairo_devicehelper.hxx.

Referenced by disposing(), and implInit().


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