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_TRANSPARENCYGROUPACTION_HXX
30 #define _CPPCANVAS_TRANSPARENCYGROUPACTION_HXX
32 #include <cppcanvas/canvas.hxx>
33 #include <cppcanvas/renderer.hxx>
36 #include <memory> // auto_ptr
47 /* Definition of internal::TransparencyGroupActionFactory class */
55 typedef ::std::auto_ptr
< GDIMetaFile
> MtfAutoPtr
;
56 typedef ::std::auto_ptr
< Gradient
> GradientAutoPtr
;
58 /** Transparency group action.
60 This action groups a bunch of other actions, to be
61 rendered with the given transparency setting against the
64 Creates encapsulated converters between GDIMetaFile and
65 XCanvas. The Canvas argument is deliberately placed at the
66 constructor, to force reconstruction of this object for a
67 new canvas. This considerably eases internal state
68 handling, since a lot of the internal state (e.g. fonts,
69 text layout) is Canvas-dependent.
71 class TransparencyGroupActionFactory
74 /** Create new transparency group action.
77 Metafile that groups all actions to be rendered
81 VCL gradient, to be rendered into the action's alpha
88 Left, top edge of destination, in current state
92 Size of the transparency group object, in current
93 state coordinate system.
95 static ActionSharedPtr
createTransparencyGroupAction( MtfAutoPtr
& rGroupMtf
,
96 GradientAutoPtr
& rAlphaGradient
,
97 const Renderer::Parameters
& rParms
,
98 const ::basegfx::B2DPoint
& rDstPoint
,
99 const ::basegfx::B2DVector
& rDstSize
,
100 const CanvasSharedPtr
& rCanvas
,
101 const OutDevState
& rState
);
104 // static factory, disable big four
105 TransparencyGroupActionFactory();
106 ~TransparencyGroupActionFactory();
107 TransparencyGroupActionFactory(const TransparencyGroupActionFactory
&);
108 TransparencyGroupActionFactory
& operator=( const TransparencyGroupActionFactory
& );
113 #endif /*_CPPCANVAS_TRANSPARENCYGROUPACTION_HXX */
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */