LibreOffice Module canvas (master) 1
ogl_bitmapcanvashelper.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
10#pragma once
11
12#include <com/sun/star/geometry/IntegerPoint2D.hpp>
13#include <com/sun/star/geometry/IntegerRectangle2D.hpp>
14#include <com/sun/star/rendering/IntegerBitmapLayout.hpp>
15
16#include "ogl_canvashelper.hxx"
17
18namespace oglcanvas
19{
22 {
23 public:
25
27 void disposing();
28
43 void init( css::rendering::XGraphicDevice& rDevice,
44 SpriteDeviceHelper& rDeviceHelper,
45 const css::geometry::IntegerSize2D& rSize );
46
47 // BitmapCanvasHelper functionality
48 // ================================
49
50 const css::geometry::IntegerSize2D& getSize() const { return maSize; }
51
52 css::uno::Reference< css::rendering::XBitmap >
53 getScaledBitmap( const css::geometry::RealSize2D& newSize,
54 bool beFast );
55
56 css::uno::Sequence< sal_Int8 >
57 getData( css::rendering::IntegerBitmapLayout& bitmapLayout,
58 const css::geometry::IntegerRectangle2D& rect );
59
60 css::uno::Sequence< sal_Int8 >
61 getPixel( css::rendering::IntegerBitmapLayout& bitmapLayout,
62 const css::geometry::IntegerPoint2D& pos );
63
64 css::rendering::IntegerBitmapLayout getMemoryLayout() const;
65
66 private:
67 css::geometry::IntegerSize2D maSize;
68 };
69}
70
71/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Helper class for basic canvas functionality.
css::uno::Sequence< sal_Int8 > getPixel(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerPoint2D &pos)
void disposing()
Release all references.
css::geometry::IntegerSize2D maSize
css::rendering::IntegerBitmapLayout getMemoryLayout() const
css::uno::Sequence< sal_Int8 > getData(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerRectangle2D &rect)
void init(css::rendering::XGraphicDevice &rDevice, SpriteDeviceHelper &rDeviceHelper, const css::geometry::IntegerSize2D &rSize)
Initialize canvas helper.
const css::geometry::IntegerSize2D & getSize() const
css::uno::Reference< css::rendering::XBitmap > getScaledBitmap(const css::geometry::RealSize2D &newSize, bool beFast)
Helper class for basic canvas functionality.