Branch data Line data Source code
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 _CPPCANVAS_IMPLCANVAS_HXX
21 : : #define _CPPCANVAS_IMPLCANVAS_HXX
22 : :
23 : : #include <com/sun/star/uno/Reference.hxx>
24 : : #include <com/sun/star/rendering/ViewState.hpp>
25 : : #include <cppcanvas/canvas.hxx>
26 : :
27 : : #include <boost/optional.hpp>
28 : :
29 : : namespace rtl
30 : : {
31 : : class OUString;
32 : : }
33 : :
34 : : namespace basegfx
35 : : {
36 : : class B2DHomMatrix;
37 : : class B2DPolyPolygon;
38 : : }
39 : :
40 : : namespace com { namespace sun { namespace star { namespace rendering
41 : : {
42 : : class XCanvas;
43 : : } } } }
44 : :
45 : :
46 : : /* Definition of ImplCanvas */
47 : :
48 : : namespace cppcanvas
49 : : {
50 : :
51 : : namespace internal
52 : : {
53 : :
54 [ # # # ]: 0 : class ImplCanvas : public virtual Canvas
[ # # # ]
55 : : {
56 : : public:
57 : : ImplCanvas( const ::com::sun::star::uno::Reference<
58 : : ::com::sun::star::rendering::XCanvas >& rCanvas );
59 : : virtual ~ImplCanvas();
60 : :
61 : : virtual void setTransformation( const ::basegfx::B2DHomMatrix& rMatrix );
62 : : virtual ::basegfx::B2DHomMatrix getTransformation() const;
63 : :
64 : : virtual void setClip( const ::basegfx::B2DPolyPolygon& rClipPoly );
65 : : virtual void setClip();
66 : : virtual ::basegfx::B2DPolyPolygon const* getClip() const;
67 : :
68 : : virtual FontSharedPtr createFont( const ::rtl::OUString& rFontName, const double& rCellSize ) const;
69 : :
70 : : virtual ColorSharedPtr createColor() const;
71 : :
72 : : virtual CanvasSharedPtr clone() const;
73 : :
74 : : virtual void clear() const;
75 : :
76 : : virtual ::com::sun::star::uno::Reference<
77 : : ::com::sun::star::rendering::XCanvas > getUNOCanvas() const;
78 : :
79 : : virtual ::com::sun::star::rendering::ViewState getViewState() const;
80 : :
81 : : // take compiler-provided default copy constructor
82 : : //ImplCanvas(const ImplCanvas&);
83 : :
84 : : private:
85 : : // default: disabled assignment
86 : : ImplCanvas& operator=( const ImplCanvas& );
87 : :
88 : : mutable ::com::sun::star::rendering::ViewState maViewState;
89 : : boost::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon;
90 : : const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas > mxCanvas;
91 : : };
92 : :
93 : : }
94 : : }
95 : :
96 : : #endif /* _CPPCANVAS_IMPLCANVAS_HXX */
97 : :
98 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|