1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: implcanvas.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CPPCANVAS_IMPLCANVAS_HXX
32 #define _CPPCANVAS_IMPLCANVAS_HXX
34 #include <com/sun/star/uno/Reference.hxx>
35 #include <com/sun/star/rendering/ViewState.hpp>
36 #include <cppcanvas/canvas.hxx>
38 #include <boost/optional.hpp>
51 namespace com
{ namespace sun
{ namespace star
{ namespace rendering
57 /* Definition of ImplCanvas */
65 class ImplCanvas
: public virtual Canvas
68 ImplCanvas( const ::com::sun::star::uno::Reference
<
69 ::com::sun::star::rendering::XCanvas
>& rCanvas
);
70 virtual ~ImplCanvas();
72 virtual void setTransformation( const ::basegfx::B2DHomMatrix
& rMatrix
);
73 virtual ::basegfx::B2DHomMatrix
getTransformation() const;
75 virtual void setClip( const ::basegfx::B2DPolyPolygon
& rClipPoly
);
76 virtual void setClip();
77 virtual ::basegfx::B2DPolyPolygon
const* getClip() const;
79 virtual FontSharedPtr
createFont( const ::rtl::OUString
& rFontName
, const double& rCellSize
) const;
81 virtual ColorSharedPtr
createColor() const;
83 virtual CanvasSharedPtr
clone() const;
85 virtual void clear() const;
87 virtual ::com::sun::star::uno::Reference
<
88 ::com::sun::star::rendering::XCanvas
> getUNOCanvas() const;
90 virtual ::com::sun::star::rendering::ViewState
getViewState() const;
92 // take compiler-provided default copy constructor
93 //ImplCanvas(const ImplCanvas&);
96 // default: disabled assignment
97 ImplCanvas
& operator=( const ImplCanvas
& );
99 mutable ::com::sun::star::rendering::ViewState maViewState
;
100 boost::optional
<basegfx::B2DPolyPolygon
> maClipPolyPolygon
;
101 const ::com::sun::star::uno::Reference
< ::com::sun::star::rendering::XCanvas
> mxCanvas
;
107 #endif /* _CPPCANVAS_IMPLCANVAS_HXX */