Skip to content

Commit

Permalink
Implement VideoRenderer, Closes gurkenlabs#291
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamebuster19901 committed Mar 31, 2020
1 parent 02ed3ca commit 4ba1d37
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/de/gurkenlabs/litiengine/graphics/VideoRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ private VideoRenderer() {
throw new UnsupportedOperationException();
}

public static void render(final Graphics2D g, final VideoManager video, final double x, final double y) {
if(video == null) {
public static void render(final Graphics2D g, final VideoManager video) {
if(video == null || video.isStatusUnknown()) {
return;
}
//TODO implement me!
g.translate(video.getX(), video.getY());
video.getPanel().paint(g);
g.translate(-video.getX(), -video.getY());
}

}

0 comments on commit 4ba1d37

Please sign in to comment.