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#ifndef __com_sun_star_rendering_CompositeOperation_idl__
24#define __com_sun_star_rendering_CompositeOperation_idl__
25
26module com { module sun { module star { module rendering {
27
28/** These constants determine how the primitive color is combined with
29    the background.<p>
30
31	When performing this calculations, it is assumed that all color
32	values are premultiplied with the corresponding alpha values (if
33	no alpha is specified, 1.0 is assumed). Then, the following
34	general compositing operation is performed:
35    <p>
36    C = Ca * Fa + Cb * Fb
37    <p>
38    where C is the result color, Ca and Cb are the input colors,
39    premultiplied with alpha, and Fa and Fb are described for the
40    different composite modes (wherein Aa and Ab denote source and
41    destination alpha, respectively).<p>
42
43    @since OOo 2.0
44 */
45constants CompositeOperation
46{
47    /** Clear the destination.<p>
48
49    	Clear the destination area. The function values are: Fa = Fb =
50    	0.<p>
51     */
52	const byte CLEAR = 0;
53
54    /** Copy source as-is to the destination.<p>
55
56    	Copy source as-is to the destination. The function values are:
57    	Fa = 1, Fb = 0.<p>
58     */
59    const byte SOURCE = 1;
60
61    /** Leave the destination as-is.<p>
62
63    	Leave the destination as-is. The function values are: Fa = 0,
64    	Fb = 1.<p>
65     */
66    const byte DESTINATION = 2;
67
68    /** Copy the source over the destination.<p>
69
70	    Copy the source over the destination. The function values are:
71	    Fa = 1, Fb = 1-Aa.<p>
72     */
73    const byte OVER = 3;
74
75    /** Copy the source under the destination.<p>
76
77    	Copy the source under the destination. The function values
78    	are: Fa = 1-Ab, Fb = 1.<p>
79     */
80    const byte UNDER = 4;
81
82    /** Copy the source to the destination.<p>
83
84    	Copy the source to the destination, but limited to where the
85    	destination is. The function values are: Fa = Ab, Fb = 0.<p>
86     */
87    const byte INSIDE = 5;
88
89    /** Leave the destination as is.<p>
90
91    	Leave the destination as is, but only where the source
92    	was. The function values are: Fa = 0, Fb = Aa.<p>
93     */
94    const byte INSIDE_REVERSE = 6;
95
96    /** Copy the source to the destination<p>
97
98    	Copy the source to the destination, but limited to where the
99    	destination is not. The function values are: Fa = 1-Ab, Fb =
100    	0.<p>
101     */
102    const byte OUTSIDE = 7;
103
104    /** Leave the destination as is.<p>
105
106    	Leave the destination as is, but only where the source has not
107    	been. The function values are: Fa = 0, Fb = 1-Aa.<p>
108     */
109    const byte OUTSIDE_REVERSE = 8;
110
111    /** Copy the source over the destination<p>
112
113    	Copy the source over the destination, but only where the
114    	destination is. Keep the destination. The function values are:
115    	Fa = Ab, Fb = 1-Aa.<p>
116     */
117    const byte ATOP = 9;
118
119    /** Copy the destination over the source.<p>
120
121    	Copy the destination over the source, but only where the
122    	source is. Keep the source. The function values are: Fa =
123    	1-Ab, Fb = Aa.<p>
124     */
125    const byte ATOP_REVERSE = 10;
126
127    /** Combine source and destination by exclusive or.<p>
128
129    	Take only the parts where either source or destination, but
130    	not both visible. The function values are: Fa = 1-Ab, Fb =
131    	1-Aa.<p>
132     */
133    const byte XOR = 11;
134
135    /** Add source and destination values.<p>
136
137    	Simply add contributions of both source and destination. The
138    	resulting color values are limited to the permissible color
139    	range, and clipped to the maximal value, if exceeded. The
140    	function values are: Fa = 1, Fb = 1.<p>
141    */
142    const byte ADD = 12;
143
144    /** Saturate source and destination.<p>
145
146    	Saturate destination with source values. The function values
147    	are: Fa = min(1,(1-Ab)/Aa), Fb = 1<p>
148     */
149    const byte SATURATE = 13;
150};
151
152}; }; }; };
153
154#endif
155