add a .xpm file as background / first TEST /
- add a special cat image in background - now ready for a pixel art phase ... - very quick&dirty implementation of xpm parser... - xpm generated with gimp using posterize. Thanks gimp !
This commit is contained in:
@@ -11,6 +11,7 @@ import org.artisanlogiciel.graphics.SvgWriter;
|
||||
import org.artisanlogiciel.osm.OsmReader;
|
||||
import org.artisanlogiciel.osm.convert.OsmToDrawing;
|
||||
import org.artisanlogiciel.util.UTF8Control;
|
||||
import org.artisanlogiciel.xpm.Xpm;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
@@ -87,6 +88,16 @@ implements StatusListener
|
||||
private MazeComponent createMazeComponent(LabyModel model, int W, int H) {
|
||||
MazeCellParameters cp = new MazeCellParameters(model.getWidth(), model.getHeight(), W, H, 3, 3);
|
||||
MazeComponent comp = new MazeComponent(model, cp, this);
|
||||
Xpm xpm = new Xpm();
|
||||
// HARDCODED FOR FIRST TEST FIXME !!!
|
||||
try {
|
||||
xpm.parse(new FileInputStream("lab/titou20.xpm"));
|
||||
comp.setXpm(xpm);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
System.err.println("Hardcoded background to fix");
|
||||
}
|
||||
return comp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user