X-Git-Url: https://git.hedgecode.org/?p=chesshog.git;a=blobdiff_plain;f=chesshog-graphics%2Fsrc%2Fmain%2Fjava%2Forg%2Fhedgecode%2Fchess%2Fimg%2FDiagram.java;fp=chesshog-format%2Fsrc%2Fmain%2Fjava%2Forg%2Fhedgecode%2Fchess%2Fimg%2FImageBuilder.java;h=05b638181c4b350f2b5904f82a8e9a56e81d57c4;hp=fd79aa0a9e73ef66f2c2623f8b85737faa47b45b;hb=e185f00e2252021d946f23f4871ae9721f7e65fa;hpb=612dc701d600159c094ab201c6de6136ae38dba9 diff --git a/chesshog-format/src/main/java/org/hedgecode/chess/img/ImageBuilder.java b/chesshog-graphics/src/main/java/org/hedgecode/chess/img/Diagram.java similarity index 65% rename from chesshog-format/src/main/java/org/hedgecode/chess/img/ImageBuilder.java rename to chesshog-graphics/src/main/java/org/hedgecode/chess/img/Diagram.java index fd79aa0..05b6381 100644 --- a/chesshog-format/src/main/java/org/hedgecode/chess/img/ImageBuilder.java +++ b/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; + } }