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