1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 package org.apache.commons.imaging.formats.gif; 18 19 /** 20 * Describes the disposal of a GIF frame when rendering the animation. Frames that aren't disposed can show through transparent pixels of coming frames. This 21 * allows new layers to contain just the part of the animation that changes. 22 */ 23 public enum DisposalMethod { 24 25 /** 26 * Typically used for a full-size non-transparent frame that will be replaced by another. 27 */ 28 UNSPECIFIED, 29 30 /** 31 * The next frame should be rendered on top of this frame. 32 */ 33 DO_NOT_DISPOSE, 34 35 /** 36 * Dispose the frame and restore the background. 37 */ 38 RESTORE_TO_BACKGROUND, 39 40 /** 41 * Dispose the frame and restore the previous undisposed frame. 42 */ 43 RESTORE_TO_PREVIOUS, 44 45 /** 46 * Unused method 1. 47 */ 48 TO_BE_DEFINED_1, 49 50 /** 51 * Unused method 2. 52 */ 53 TO_BE_DEFINED_2, 54 55 /** 56 * Unused method 3. 57 */ 58 TO_BE_DEFINED_3, 59 60 /** 61 * Unused method 4. 62 */ 63 TO_BE_DEFINED_4 64 }