1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_rendering_CompositeOperation_idl__ 28#define __com_sun_star_rendering_CompositeOperation_idl__ 29 30module com { module sun { module star { module rendering { 31 32/** These constants determine how the primitive color is combined with 33 the background.<p> 34 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: 39 <p> 40 C = Ca * Fa + Cb * Fb 41 <p> 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> 46 47 @since OOo 2.0 48 */ 49constants CompositeOperation 50{ 51 /** Clear the destination.<p> 52 53 Clear the destination area. The function values are: Fa = Fb = 54 0.<p> 55 */ 56 const byte CLEAR = 0; 57 58 /** Copy source as-is to the destination.<p> 59 60 Copy source as-is to the destination. The function values are: 61 Fa = 1, Fb = 0.<p> 62 */ 63 const byte SOURCE = 1; 64 65 /** Leave the destination as-is.<p> 66 67 Leave the destination as-is. The function values are: Fa = 0, 68 Fb = 1.<p> 69 */ 70 const byte DESTINATION = 2; 71 72 /** Copy the source over the destination.<p> 73 74 Copy the source over the destination. The function values are: 75 Fa = 1, Fb = 1-Aa.<p> 76 */ 77 const byte OVER = 3; 78 79 /** Copy the source under the destination.<p> 80 81 Copy the source under the destination. The function values 82 are: Fa = 1-Ab, Fb = 1.<p> 83 */ 84 const byte UNDER = 4; 85 86 /** Copy the source to the destination.<p> 87 88 Copy the source to the destination, but limited to where the 89 destination is. The function values are: Fa = Ab, Fb = 0.<p> 90 */ 91 const byte INSIDE = 5; 92 93 /** Leave the destination as is.<p> 94 95 Leave the destination as is, but only where the source 96 was. The function values are: Fa = 0, Fb = Aa.<p> 97 */ 98 const byte INSIDE_REVERSE = 6; 99 100 /** Copy the source to the destination<p> 101 102 Copy the source to the destination, but limited to where the 103 destination is not. The function values are: Fa = 1-Ab, Fb = 104 0.<p> 105 */ 106 const byte OUTSIDE = 7; 107 108 /** Leave the destination as is.<p> 109 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> 112 */ 113 const byte OUTSIDE_REVERSE = 8; 114 115 /** Copy the source over the destination<p> 116 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> 120 */ 121 const byte ATOP = 9; 122 123 /** Copy the destination over the source.<p> 124 125 Copy the destination over the source, but only where the 126 source is. Keep the source. The function values are: Fa = 127 1-Ab, Fb = Aa.<p> 128 */ 129 const byte ATOP_REVERSE = 10; 130 131 /** Combine source and destination by exclusive or.<p> 132 133 Take only the parts where either source or destination, but 134 not both visible. The function values are: Fa = 1-Ab, Fb = 135 1-Aa.<p> 136 */ 137 const byte XOR = 11; 138 139 /** Add source and destination values.<p> 140 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> 145 */ 146 const byte ADD = 12; 147 148 /** Saturate source and destination.<p> 149 150 Saturate destination with source values. The function values 151 are: Fa = min(1,(1-Ab)/Aa), Fb = 1<p> 152 */ 153 const byte SATURATE = 13; 154}; 155 156}; }; }; }; 157 158#endif 159