Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / cppcanvas / source / wrapper / implcanvas.hxx
blobcda88f564664fa41ee4f223bbfc0dff9154779fb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _CPPCANVAS_IMPLCANVAS_HXX
21 #define _CPPCANVAS_IMPLCANVAS_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/rendering/ViewState.hpp>
25 #include <cppcanvas/canvas.hxx>
27 #include <boost/optional.hpp>
30 namespace basegfx
32 class B2DHomMatrix;
33 class B2DPolyPolygon;
36 namespace com { namespace sun { namespace star { namespace rendering
38 class XCanvas;
39 } } } }
42 /* Definition of ImplCanvas */
44 namespace cppcanvas
47 namespace internal
50 class ImplCanvas : public virtual Canvas
52 public:
53 ImplCanvas( const ::com::sun::star::uno::Reference<
54 ::com::sun::star::rendering::XCanvas >& rCanvas );
55 virtual ~ImplCanvas();
57 virtual void setTransformation( const ::basegfx::B2DHomMatrix& rMatrix );
58 virtual ::basegfx::B2DHomMatrix getTransformation() const;
60 virtual void setClip( const ::basegfx::B2DPolyPolygon& rClipPoly );
61 virtual void setClip();
62 virtual ::basegfx::B2DPolyPolygon const* getClip() const;
64 virtual FontSharedPtr createFont( const OUString& rFontName, const double& rCellSize ) const;
66 virtual ColorSharedPtr createColor() const;
68 virtual CanvasSharedPtr clone() const;
70 virtual void clear() const;
72 virtual ::com::sun::star::uno::Reference<
73 ::com::sun::star::rendering::XCanvas > getUNOCanvas() const;
75 virtual ::com::sun::star::rendering::ViewState getViewState() const;
77 // take compiler-provided default copy constructor
78 //ImplCanvas(const ImplCanvas&);
80 private:
81 // default: disabled assignment
82 ImplCanvas& operator=( const ImplCanvas& );
84 mutable ::com::sun::star::rendering::ViewState maViewState;
85 boost::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon;
86 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas > mxCanvas;
92 #endif /* _CPPCANVAS_IMPLCANVAS_HXX */
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */