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