1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_rendering_CompositeOperation_idl__
20 #define __com_sun_star_rendering_CompositeOperation_idl__
22 module com
{ module sun
{ module star
{ module rendering
{
24 /** These constants determine how the primitive color is combined with
27 When performing this calculations, it is assumed that all color
28 values are premultiplied with the corresponding alpha values (if
29 no alpha is specified, 1.0 is assumed). Then, the following
30 general compositing operation is performed:
34 where C is the result color, Ca and Cb are the input colors,
35 premultiplied with alpha, and Fa and Fb are described for the
36 different composite modes (wherein Aa and Ab denote source and
37 destination alpha, respectively).<p>
41 constants CompositeOperation
43 /** Clear the destination.<p>
45 Clear the destination area. The function values are: Fa = Fb =
50 /** Copy source as-is to the destination.<p>
52 Copy source as-is to the destination. The function values are:
55 const byte SOURCE = 1;
57 /** Leave the destination as-is.<p>
59 Leave the destination as-is. The function values are: Fa = 0,
62 const byte DESTINATION
= 2;
64 /** Copy the source over the destination.<p>
66 Copy the source over the destination. The function values are:
71 /** Copy the source under the destination.<p>
73 Copy the source under the destination. The function values
74 are: Fa = 1-Ab, Fb = 1.<p>
78 /** Copy the source to the destination.<p>
80 Copy the source to the destination, but limited to where the
81 destination is. The function values are: Fa = Ab, Fb = 0.<p>
83 const byte INSIDE
= 5;
85 /** Leave the destination as is.<p>
87 Leave the destination as is, but only where the source
88 was. The function values are: Fa = 0, Fb = Aa.<p>
90 const byte INSIDE_REVERSE
= 6;
92 /** Copy the source to the destination<p>
94 Copy the source to the destination, but limited to where the
95 destination is not. The function values are: Fa = 1-Ab, Fb =
98 const byte OUTSIDE
= 7;
100 /** Leave the destination as is.<p>
102 Leave the destination as is, but only where the source has not
103 been. The function values are: Fa = 0, Fb = 1-Aa.<p>
105 const byte OUTSIDE_REVERSE
= 8;
107 /** Copy the source over the destination<p>
109 Copy the source over the destination, but only where the
110 destination is. Keep the destination. The function values are:
111 Fa = Ab, Fb = 1-Aa.<p>
115 /** Copy the destination over the source.<p>
117 Copy the destination over the source, but only where the
118 source is. Keep the source. The function values are: Fa =
121 const byte ATOP_REVERSE
= 10;
123 /** Combine source and destination by exclusive or.<p>
125 Take only the parts where either source or destination, but
126 not both visible. The function values are: Fa = 1-Ab, Fb =
131 /** Add source and destination values.<p>
133 Simply add contributions of both source and destination. The
134 resulting color values are limited to the permissible color
135 range, and clipped to the maximal value, if exceeded. The
136 function values are: Fa = 1, Fb = 1.<p>
140 /** Saturate source and destination.<p>
142 Saturate destination with source values. The function values
143 are: Fa = min(1,(1-Ab)/Aa), Fb = 1<p>
145 const byte SATURATE
= 13;
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */