View Javadoc
1   /*
2    *  Licensed under the Apache License, Version 2.0 (the "License");
3    *  you may not use this file except in compliance with the License.
4    *  You may obtain a copy of the License at
5    *
6    *       http://www.apache.org/licenses/LICENSE-2.0
7    *
8    *  Unless required by applicable law or agreed to in writing, software
9    *  distributed under the License is distributed on an "AS IS" BASIS,
10   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11   *  See the License for the specific language governing permissions and
12   *  limitations under the License.
13   *  under the License.
14   */
15  
16  package org.apache.commons.imaging.formats.pcx;
17  
18  import org.apache.commons.imaging.ImagingParameters;
19  
20  /**
21   * Parameters used by the Pcx format.
22   *
23   * @since 1.0-alpha3
24   */
25  public class PcxImagingParameters extends ImagingParameters<PcxImagingParameters> {
26  
27      private int planes = -1;
28      private int bitDepth = -1;
29      private int compression = PcxConstants.PCX_COMPRESSION_UNCOMPRESSED;
30  
31      public int getBitDepth() {
32          return bitDepth;
33      }
34  
35      public int getCompression() {
36          return compression;
37      }
38  
39      public int getPlanes() {
40          return planes;
41      }
42  
43      public PcxImagingParameters setBitDepth(final int bitDepth) {
44          this.bitDepth = bitDepth;
45          return asThis();
46      }
47  
48      public PcxImagingParameters setCompression(final int compression) {
49          this.compression = compression;
50          return asThis();
51      }
52  
53      public PcxImagingParameters setPlanes(final int planes) {
54          this.planes = planes;
55          return asThis();
56      }
57  
58  }