Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / rendering / CompositeOperation.idl
blob7d8cff06c90bc4059f2ae60b1e438ced725d4435
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: CompositeOperation.idl,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_rendering_CompositeOperation_idl__
31 #define __com_sun_star_rendering_CompositeOperation_idl__
33 module com { module sun { module star { module rendering {
35 /** These constants determine how the primitive color is combined with
36 the background.<p>
38 When performing this calculations, it is assumed that all color
39 values are premultiplied with the corresponding alpha values (if
40 no alpha is specified, 1.0 is assumed). Then, the following
41 general compositing operation is performed:
42 <p>
43 C = Ca * Fa + Cb * Fb
44 <p>
45 where C is the result color, Ca and Cb are the input colors,
46 premultiplied with alpha, and Fa and Fb are described for the
47 different composite modes (wherein Aa and Ab denote source and
48 destination alpha, respectively).<p>
50 @since OOo 2.0.0
52 constants CompositeOperation
54 /** Clear the destination.<p>
56 Clear the destination area. The function values are: Fa = Fb =
57 0.<p>
59 const byte CLEAR = 0;
61 /** Copy source as-is to the destination.<p>
63 Copy source as-is to the destination. The function values are:
64 Fa = 1, Fb = 0.<p>
66 const byte SOURCE = 1;
68 /** Leave the destination as-is.<p>
70 Leave the destination as-is. The function values are: Fa = 0,
71 Fb = 1.<p>
73 const byte DESTINATION = 2;
75 /** Copy the source over the destination.<p>
77 Copy the source over the destination. The function values are:
78 Fa = 1, Fb = 1-Aa.<p>
80 const byte OVER = 3;
82 /** Copy the source under the destination.<p>
84 Copy the source under the destination. The function values
85 are: Fa = 1-Ab, Fb = 1.<p>
87 const byte UNDER = 4;
89 /** Copy the source to the destination.<p>
91 Copy the source to the destination, but limited to where the
92 destination is. The function values are: Fa = Ab, Fb = 0.<p>
94 const byte INSIDE = 5;
96 /** Leave the destination as is.<p>
98 Leave the destination as is, but only where the source
99 was. The function values are: Fa = 0, Fb = Aa.<p>
101 const byte INSIDE_REVERSE = 6;
103 /** Copy the source to the destination<p>
105 Copy the source to the destination, but limited to where the
106 destination is not. The function values are: Fa = 1-Ab, Fb =
107 0.<p>
109 const byte OUTSIDE = 7;
111 /** Leave the destination as is.<p>
113 Leave the destination as is, but only where the source has not
114 been. The function values are: Fa = 0, Fb = 1-Aa.<p>
116 const byte OUTSIDE_REVERSE = 8;
118 /** Copy the source over the destination<p>
120 Copy the source over the destination, but only where the
121 destination is. Keep the destination. The function values are:
122 Fa = Ab, Fb = 1-Aa.<p>
124 const byte ATOP = 9;
126 /** Copy the destination over the source.<p>
128 Copy the destination over the source, but only where the
129 source is. Keep the source. The function values are: Fa =
130 1-Ab, Fb = Aa.<p>
132 const byte ATOP_REVERSE = 10;
134 /** Combine source and destination by exclusive or.<p>
136 Take only the parts where either source or destination, but
137 not both visible. The function values are: Fa = 1-Ab, Fb =
138 1-Aa.<p>
140 const byte XOR = 11;
142 /** Add source and destination values.<p>
144 Simply add contributions of both source and destination. The
145 resulting color values are limited to the permissible color
146 range, and clipped to the maximal value, if exceeded. The
147 function values are: Fa = 1, Fb = 1.<p>
149 const byte ADD = 12;
151 /** Saturate source and destination.<p>
153 Saturate destination with source values. The function values
154 are: Fa = min(1,(1-Ab)/Aa), Fb = 1<p>
156 const byte SATURATE = 13;
159 }; }; }; };
161 #endif