1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
24 #include <cppcanvas/canvas.hxx>
30 namespace com
{ namespace sun
{ namespace star
{ namespace rendering
33 struct StrokeAttributes
;
37 /* Definition of internal::PolyPolyActionFactory class */
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
55 /// Create polygon, fill/stroke according to state
56 static ActionSharedPtr
createPolyPolyAction( const ::basegfx::B2DPolyPolygon
&,
57 const CanvasSharedPtr
&,
60 /// Create texture-filled polygon
61 static ActionSharedPtr
createPolyPolyAction( const ::basegfx::B2DPolyPolygon
&,
62 const CanvasSharedPtr
&,
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
&,
71 /// Create stroked polygon
72 static ActionSharedPtr
createPolyPolyAction( const ::basegfx::B2DPolyPolygon
&,
73 const CanvasSharedPtr
&,
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
&,
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: */