LibreOffice Module canvas (master)  1
devicehelper.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_CANVAS_SOURCE_VCL_DEVICEHELPER_HXX
21 #define INCLUDED_CANVAS_SOURCE_VCL_DEVICEHELPER_HXX
22 
23 #include <com/sun/star/rendering/XGraphicDevice.hpp>
24 
25 #include "outdevprovider.hxx"
26 
27 
28 /* Definition of DeviceHelper class */
29 
30 namespace vclcanvas
31 {
33  {
34  public:
35  DeviceHelper();
36 
38  DeviceHelper(const DeviceHelper&) = delete;
39  const DeviceHelper& operator=(const DeviceHelper&) = delete;
40 
41  void init( const OutDevProviderSharedPtr& rOutDev );
42 
44  void disposing();
45 
46  // XWindowGraphicDevice
47  css::geometry::RealSize2D getPhysicalResolution();
48  css::geometry::RealSize2D getPhysicalSize();
49  css::uno::Reference< css::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
50  const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
51  const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > >& points );
52  css::uno::Reference< css::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
53  const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
54  const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > >& points );
55  css::uno::Reference< css::rendering::XBitmap > createCompatibleBitmap(
56  const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
57  const css::geometry::IntegerSize2D& size );
58  css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileBitmap(
59  const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
60  const css::geometry::IntegerSize2D& size );
61  css::uno::Reference< css::rendering::XBitmap > createCompatibleAlphaBitmap(
62  const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
63  const css::geometry::IntegerSize2D& size );
64  css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
65  const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
66  const css::geometry::IntegerSize2D& size );
67 
68  css::uno::Any isAccelerated() const;
69  css::uno::Any getDeviceHandle() const;
70  css::uno::Any getSurfaceHandle() const;
71  css::uno::Reference<
72  css::rendering::XColorSpace > const & getColorSpace() const;
73 
74  const OutDevProviderSharedPtr& getOutDev() const { return mpOutDev; }
75 
79  void dumpScreenContent() const;
80 
81  private:
84  };
85 }
86 
87 #endif // INCLUDED_CANVAS_SOURCE_VCL_DEVICEHELPER_HXX
88 
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< OutDevProvider > OutDevProviderSharedPtr
css::uno::Reference< css::rendering::XColorSpace > const & getColorSpace() const
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileAlphaBitmap(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size)
const OutDevProviderSharedPtr & getOutDev() const
css::uno::Any getSurfaceHandle() const
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::Any isAccelerated() const
css::geometry::RealSize2D getPhysicalResolution()
void dumpScreenContent() const
called when DumpScreenContent property is enabled on XGraphicDevice, and writes out bitmaps of curren...
void disposing()
Dispose all internal references.
css::uno::Reference< css::rendering::XBitmap > createCompatibleBitmap(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size)
void init(const OutDevProviderSharedPtr &rOutDev)
OutDevProviderSharedPtr mpOutDev
For retrieving device info.
css::uno::Any getDeviceHandle() const
size
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileBitmap(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size)
css::geometry::RealSize2D getPhysicalSize()
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)
const DeviceHelper & operator=(const DeviceHelper &)=delete
css::uno::Reference< css::rendering::XBitmap > createCompatibleAlphaBitmap(const css::uno::Reference< css::rendering::XGraphicDevice > &rDevice, const css::geometry::IntegerSize2D &size)