Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / cppcanvas / source / mtfrenderer / polypolyaction.hxx
blob47c4e91c204ca25d4c3a23f553dfe171cfe8cf1c
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_POLYPOLYACTION_HXX
21 #define _CPPCANVAS_POLYPOLYACTION_HXX
23 #include <action.hxx>
24 #include <cppcanvas/canvas.hxx>
27 namespace basegfx {
28 class B2DPolyPolygon;
30 namespace com { namespace sun { namespace star { namespace rendering
32 struct Texture;
33 struct StrokeAttributes;
34 } } } }
37 /* Definition of internal::PolyPolyActionFactory class */
39 namespace cppcanvas
41 namespace internal
43 struct OutDevState;
45 /** Creates encapsulated converters between GDIMetaFile and
46 XCanvas. The Canvas argument is deliberately placed at the
47 constructor, to force reconstruction of this object for a
48 new canvas. This considerably eases internal state
49 handling, since a lot of the internal state (e.g. fonts,
50 text layout) is Canvas-dependent.
52 class PolyPolyActionFactory
54 public:
55 /// Create polygon, fill/stroke according to state
56 static ActionSharedPtr createPolyPolyAction( const ::basegfx::B2DPolyPolygon&,
57 const CanvasSharedPtr&,
58 const OutDevState& );
60 /// Create texture-filled polygon
61 static ActionSharedPtr createPolyPolyAction( const ::basegfx::B2DPolyPolygon&,
62 const CanvasSharedPtr&,
63 const OutDevState&,
64 const ::com::sun::star::rendering::Texture& );
66 /// Create line polygon (always stroked, not filled)
67 static ActionSharedPtr createLinePolyPolyAction( const ::basegfx::B2DPolyPolygon&,
68 const CanvasSharedPtr&,
69 const OutDevState& );
71 /// Create stroked polygon
72 static ActionSharedPtr createPolyPolyAction( const ::basegfx::B2DPolyPolygon&,
73 const CanvasSharedPtr&,
74 const OutDevState&,
75 const ::com::sun::star::rendering::StrokeAttributes& );
77 /// For transparent painting of the given polygon (normally, we take the colors always opaque)
78 static ActionSharedPtr createPolyPolyAction( const ::basegfx::B2DPolyPolygon&,
79 const CanvasSharedPtr&,
80 const OutDevState&,
81 int nTransparency );
83 private:
84 // static factory, disable big four
85 PolyPolyActionFactory();
86 ~PolyPolyActionFactory();
87 PolyPolyActionFactory(const PolyPolyActionFactory&);
88 PolyPolyActionFactory& operator=( const PolyPolyActionFactory& );
93 #endif /* _CPPCANVAS_POLYPOLYACTION_HXX */
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */