001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.imaging.formats.gif;
018
019/**
020 * 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
021 * allows new layers to contain just the part of the animation that changes.
022 */
023public enum DisposalMethod {
024
025    /**
026     * Typically used for a full-size non-transparent frame that will be replaced by another.
027     */
028    UNSPECIFIED,
029
030    /**
031     * The next frame should be rendered on top of this frame.
032     */
033    DO_NOT_DISPOSE,
034
035    /**
036     * Dispose the frame and restore the background.
037     */
038    RESTORE_TO_BACKGROUND,
039
040    /**
041     * Dispose the frame and restore the previous undisposed frame.
042     */
043    RESTORE_TO_PREVIOUS,
044
045    /**
046     * Unused method 1.
047     */
048    TO_BE_DEFINED_1,
049
050    /**
051     * Unused method 2.
052     */
053    TO_BE_DEFINED_2,
054
055    /**
056     * Unused method 3.
057     */
058    TO_BE_DEFINED_3,
059
060    /**
061     * Unused method 4.
062     */
063    TO_BE_DEFINED_4
064}