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