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

#include <dx_devicehelper.hxx>

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

Public Member Functions

 DeviceHelper ()
 
 ~DeviceHelper ()
 
 DeviceHelper (const DeviceHelper &)=delete
 make noncopyable More...
 
const DeviceHelperoperator= (const DeviceHelper &)=delete
 
void init (HDC hdc, OutputDevice *pOutputDev, css::rendering::XGraphicDevice &rDevice)
 Init the device 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 > getColorSpace () const
 
void dumpScreenContent () const
 called when DumpScreenContent property is enabled on XGraphicDevice, and writes out bitmaps of current screen. More...
 

Protected Member Functions

HDC getHDC () const
 
css::rendering::XGraphicDevice * getDevice () const
 

Private Attributes

css::rendering::XGraphicDevice * mpDevice
 Phyical output device. More...
 
HDC mnHDC
 
VclPtr< OutputDevicempOutDev
 

Detailed Description

Definition at line 37 of file dx_devicehelper.hxx.

Constructor & Destructor Documentation

◆ DeviceHelper() [1/2]

dxcanvas::DeviceHelper::DeviceHelper ( )

Definition at line 43 of file dx_devicehelper.cxx.

◆ ~DeviceHelper()

dxcanvas::DeviceHelper::~DeviceHelper ( )

Definition at line 50 of file dx_devicehelper.cxx.

◆ DeviceHelper() [2/2]

dxcanvas::DeviceHelper::DeviceHelper ( const DeviceHelper )
delete

make noncopyable

Member Function Documentation

◆ createCompatibleAlphaBitmap()

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

◆ createCompatibleBezierPolyPolygon()

css::uno::Reference< css::rendering::XBezierPolyPolygon2D > dxcanvas::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 > dxcanvas::DeviceHelper::createCompatibleBitmap ( const css::uno::Reference< css::rendering::XGraphicDevice > &  rDevice,
const css::geometry::IntegerSize2D &  size 
)

◆ createCompatibleLinePolyPolygon()

css::uno::Reference< css::rendering::XLinePolyPolygon2D > dxcanvas::DeviceHelper::createCompatibleLinePolyPolygon ( const css::uno::Reference< css::rendering::XGraphicDevice > &  rDevice,
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > > &  points 
)

◆ createVolatileAlphaBitmap()

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

◆ createVolatileBitmap()

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

◆ disposing()

void dxcanvas::DeviceHelper::disposing ( )

Dispose all internal references.

Definition at line 62 of file dx_devicehelper.cxx.

References mnHDC, mpDevice, and mpOutDev.

Referenced by dxcanvas::SpriteDeviceHelper::disposing().

◆ dumpScreenContent()

void dxcanvas::DeviceHelper::dumpScreenContent ( ) const
inline

called when DumpScreenContent property is enabled on XGraphicDevice, and writes out bitmaps of current screen.

Definition at line 93 of file dx_devicehelper.hxx.

◆ getColorSpace()

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

Definition at line 191 of file dx_devicehelper.cxx.

References vcl::unotools::createStandardColorSpace().

◆ getDevice()

css::rendering::XGraphicDevice * dxcanvas::DeviceHelper::getDevice ( ) const
inlineprotected

Definition at line 97 of file dx_devicehelper.hxx.

References mpDevice.

◆ getDeviceHandle()

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

Definition at line 179 of file dx_devicehelper.cxx.

References VclPtr< class reference_type >::get(), and mpOutDev.

◆ getHDC()

HDC dxcanvas::DeviceHelper::getHDC ( ) const
inlineprotected

Definition at line 96 of file dx_devicehelper.hxx.

References mnHDC.

Referenced by getPhysicalResolution(), and getPhysicalSize().

◆ getPhysicalResolution()

geometry::RealSize2D dxcanvas::DeviceHelper::getPhysicalResolution ( )

◆ getPhysicalSize()

geometry::RealSize2D dxcanvas::DeviceHelper::getPhysicalSize ( )

◆ getSurfaceHandle()

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

Definition at line 184 of file dx_devicehelper.cxx.

◆ init()

void dxcanvas::DeviceHelper::init ( HDC  hdc,
OutputDevice pOutputDev,
css::rendering::XGraphicDevice &  rDevice 
)

Init the device helper.

Parameters
hdcprivate or class dc of the output device. is only stored, not release
rDeviceRef back to owning UNO device

◆ isAccelerated()

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

Definition at line 174 of file dx_devicehelper.cxx.

◆ operator=()

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

Member Data Documentation

◆ mnHDC

HDC dxcanvas::DeviceHelper::mnHDC
private

Definition at line 107 of file dx_devicehelper.hxx.

Referenced by disposing(), and getHDC().

◆ mpDevice

css::rendering::XGraphicDevice* dxcanvas::DeviceHelper::mpDevice
private

Phyical output device.

Deliberately not a refcounted reference, because of potential circular references for canvas. Needed to create bitmaps

Definition at line 106 of file dx_devicehelper.hxx.

Referenced by disposing(), getDevice(), getPhysicalResolution(), and getPhysicalSize().

◆ mpOutDev

VclPtr<OutputDevice> dxcanvas::DeviceHelper::mpOutDev
private

Definition at line 108 of file dx_devicehelper.hxx.

Referenced by disposing(), and getDeviceHandle().


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