Debian Codegraph @

src/uk/me/parabola/imgfmt/app/typ/Xpm.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2011.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 or
6 * version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 */
13 package uk.me.parabola.imgfmt.app.typ;
14
15 import uk.me.parabola.imgfmt.app.ImgFileWriter;
16
17 /**
18 * Holds everything read from an XPM value in the typ txt file.
19 *
20 * @author Steve Ratcliffe
21 */
22 public class Xpm {
23 private ColourInfo colourInfo;
24 private Image image;
25
26 public ColourInfo getColourInfo() {
27 return colourInfo;
28 }
29
30 public void setColourInfo(ColourInfo colourInfo) {
31 this.colourInfo = colourInfo;
32 }
33
34 public void setImage(Image image) {
35 this.image = image;
36 }
37
38 public boolean hasImage() {
39 return image != null;
40 }
41
42 public void writeImage(ImgFileWriter writer) {
43 image.write(writer);
44 }
45 }