[LIB-9] Separate chesshog-graphics module
[chesshog.git] / chesshog-graphics / src / main / java / org / hedgecode / chess / img / Diagram.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018. Developed by Hedgecode.
+ * Copyright (c) 2018-2019. Developed by Hedgecode.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package org.hedgecode.chess.img;
 
 import java.awt.image.RenderedImage;
 
-import org.hedgecode.chess.position.Builder;
 import org.hedgecode.chess.position.Position;
 
 /**
@@ -26,10 +25,22 @@ import org.hedgecode.chess.position.Position;
  *
  * @author Dmitry Samoshin aka gotty
  */
-public interface ImageBuilder extends Builder {
+public class Diagram {
 
-    String build(Position position);
+    private Position position;
+    private RenderedImage image;
 
-    RenderedImage build(Position position, String boardType, String pieceType) throws ImageException;
+    Diagram(Position position, RenderedImage image) {
+        this.position = position;
+        this.image = image;
+    }
+
+    public Position getPosition() {
+        return position;
+    }
+
+    public RenderedImage getImage() {
+        return image;
+    }
 
 }