xref: /trunk/main/svtools/source/inc/gradwrap.hxx (revision 01aa44aa)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 
25 #ifndef _SVGEN_HXX
26 #include <svgen.hxx>
27 #endif
28 
29 
30 /******************************************************************************
31 |*
32 |* 	class GradientWrapper
33 |*
34 |*	Ersterstellung:		KA 24.11.95
35 |*	letzte Aenderung:	KA 24.11.95
36 |*
37 |*	Zeck:	dient beim MetaFile-Export dazu, die eigentliche Berechungs-
38 |* 			funktionalitaet zu kapseln. Das Schreiben der Records fuer
39 |*			die unterschiedlichen File-Formate geschieht ueber LinkHandler.
40 |*
41 |*			Klassen, die diesen Wrapper benutzen, muessen drei Linkhandler
42 |* 			zur Verfuegung stellen, die im Ctor uebergeben werden:
43 |*
44 |*				1. Linkhandler zum Schreiben eines Records fuer Polygonausgabe
45 |*				2. Linkhandler zum Schreiben eines Records fuer PolyPolygonausgabe
46 |*				3. Linkhandler zum Schreiben eines Records fuer Setzen der Brush
47 |*
48 \******************************************************************************/
49 
50 
51 class GradientWrapper
52 {
53 	Link		aDrawPolyRecordHdl;
54 	Link		aDrawPolyPolyRecordHdl;
55 	Link		aSetFillInBrushRecordHdl;
56 
GradientWrapper()57 				GradientWrapper() {};
58 
59 
60 public:
61 				GradientWrapper(const Link& rDrawPolyRecordHdl,
62 								const Link& rDrawPolyPolyRecordHdl,
63 								const Link& rSetFillInBrushHdl);
64 				~GradientWrapper();
65 
66 
67 	void 		WriteLinearGradient(const Rectangle& rRect,
68 									const Gradient& rGradient);
69 	void		WriteRadialGradient(const Rectangle& rRect,
70 									const Gradient& rGradient);
71 	void		WriteRectGradient(const Rectangle& rRect,
72 								  const Gradient& rGradient);
73 };
74