Skip to content

Instantly share code, notes, and snippets.

@Zarkonnen
Created November 17, 2012 12:05
Show Gist options
  • Save Zarkonnen/4095316 to your computer and use it in GitHub Desktop.
Save Zarkonnen/4095316 to your computer and use it in GitHub Desktop.
Graphics interface sketch
public interface Gfx {
public int width();
public int height();
public void blit(Img img, int x, int y);
public void line(Clr clr, int x1, int y1, int x2, int y2);
public void rect(Clr clr, int x, int y, int w, int h);
}
public class Img {
public String source;
public int customWidth;
public int customHeight;
public double rotation;
public Clr tint;
}
public class Clr {
public int red, green, blue, alpha;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment