Bump for 3.6-28
[LibreOffice.git] / cppcanvas / source / inc / canvasgraphichelper.hxx
blob6d49939be1b76b540a42973b7f1e6415fcf4e30b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _CPPCANVAS_CANVASGRAPHICHELPER_HXX
30 #define _CPPCANVAS_CANVASGRAPHICHELPER_HXX
32 #include <com/sun/star/rendering/RenderState.hpp>
33 #include <basegfx/polygon/b2dpolypolygon.hxx>
35 #include <cppcanvas/canvasgraphic.hxx>
37 #include <boost/optional.hpp>
39 namespace com { namespace sun { namespace star { namespace rendering
41 class XGraphicDevice;
42 } } } }
45 /* Definition of CanvasGraphicHelper class */
47 namespace cppcanvas
50 namespace internal
53 class CanvasGraphicHelper : public virtual CanvasGraphic
55 public:
56 CanvasGraphicHelper( const CanvasSharedPtr& rParentCanvas );
58 // CanvasGraphic implementation
59 virtual void setTransformation( const ::basegfx::B2DHomMatrix& rMatrix );
60 virtual ::basegfx::B2DHomMatrix getTransformation() const;
61 virtual void setClip( const ::basegfx::B2DPolyPolygon& rClipPoly );
62 virtual void setClip();
63 virtual ::basegfx::B2DPolyPolygon const* getClip() const;
64 virtual void setRGBAColor( Color::IntSRGBA );
65 virtual Color::IntSRGBA getRGBAColor() const;
66 virtual void setCompositeOp( CompositeOp aOp );
67 virtual CompositeOp getCompositeOp() const;
69 protected:
70 // for our clients
71 // ===============
72 CanvasSharedPtr getCanvas() const;
73 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice > getGraphicDevice() const;
74 const ::com::sun::star::rendering::RenderState& getRenderState() const;
76 private:
77 mutable ::com::sun::star::rendering::RenderState maRenderState;
79 boost::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon;
80 CanvasSharedPtr mpCanvas;
81 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice > mxGraphicDevice;
87 #endif /* _CPPCANVAS_CANVASGRAPHICHELPER_HXX */
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */