1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_rendering_CompositeOperation_idl__
28 #define __com_sun_star_rendering_CompositeOperation_idl__
30 module com
{ module sun
{ module star
{ module rendering
{
32 /** These constants determine how the primitive color is combined with
35 When performing this calculations, it is assumed that all color
36 values are premultiplied with the corresponding alpha values (if
37 no alpha is specified, 1.0 is assumed). Then, the following
38 general compositing operation is performed:
42 where C is the result color, Ca and Cb are the input colors,
43 premultiplied with alpha, and Fa and Fb are described for the
44 different composite modes (wherein Aa and Ab denote source and
45 destination alpha, respectively).<p>
49 constants CompositeOperation
51 /** Clear the destination.<p>
53 Clear the destination area. The function values are: Fa = Fb =
58 /** Copy source as-is to the destination.<p>
60 Copy source as-is to the destination. The function values are:
63 const byte SOURCE = 1;
65 /** Leave the destination as-is.<p>
67 Leave the destination as-is. The function values are: Fa = 0,
70 const byte DESTINATION
= 2;
72 /** Copy the source over the destination.<p>
74 Copy the source over the destination. The function values are:
79 /** Copy the source under the destination.<p>
81 Copy the source under the destination. The function values
82 are: Fa = 1-Ab, Fb = 1.<p>
86 /** Copy the source to the destination.<p>
88 Copy the source to the destination, but limited to where the
89 destination is. The function values are: Fa = Ab, Fb = 0.<p>
91 const byte INSIDE
= 5;
93 /** Leave the destination as is.<p>
95 Leave the destination as is, but only where the source
96 was. The function values are: Fa = 0, Fb = Aa.<p>
98 const byte INSIDE_REVERSE
= 6;
100 /** Copy the source to the destination<p>
102 Copy the source to the destination, but limited to where the
103 destination is not. The function values are: Fa = 1-Ab, Fb =
106 const byte OUTSIDE
= 7;
108 /** Leave the destination as is.<p>
110 Leave the destination as is, but only where the source has not
111 been. The function values are: Fa = 0, Fb = 1-Aa.<p>
113 const byte OUTSIDE_REVERSE
= 8;
115 /** Copy the source over the destination<p>
117 Copy the source over the destination, but only where the
118 destination is. Keep the destination. The function values are:
119 Fa = Ab, Fb = 1-Aa.<p>
123 /** Copy the destination over the source.<p>
125 Copy the destination over the source, but only where the
126 source is. Keep the source. The function values are: Fa =
129 const byte ATOP_REVERSE
= 10;
131 /** Combine source and destination by exclusive or.<p>
133 Take only the parts where either source or destination, but
134 not both visible. The function values are: Fa = 1-Ab, Fb =
139 /** Add source and destination values.<p>
141 Simply add contributions of both source and destination. The
142 resulting color values are limited to the permissible color
143 range, and clipped to the maximal value, if exceeded. The
144 function values are: Fa = 1, Fb = 1.<p>
148 /** Saturate source and destination.<p>
150 Saturate destination with source values. The function values
151 are: Fa = min(1,(1-Ab)/Aa), Fb = 1<p>
153 const byte SATURATE
= 13;