package com.danitheskunk.skunkworks.backends.gl;

import com.danitheskunk.skunkworks.Recti;
import com.danitheskunk.skunkworks.Vec2i;
import com.danitheskunk.skunkworks.gfx.ITexture;
import com.danitheskunk.skunkworks.gfx.Image;

class Texture implements ITexture {
	private final Image img; //for re-blitting onto texture atlas
	private Recti texArea;

	Texture(Recti texArea, Image img) {
		this.texArea = texArea;
		this.img = img;
	}

	@Override
	public int getHeight() {
		return img.getHeight();
	}

	//setters
	Image getImg() {
		return img;
	}

	@Override
	public Vec2i getSize() {
		return img.getSize();
	}

	Recti getTexArea() {
		return texArea;
	}

	@Override
	public int getWidth() {
		return img.getWidth();
	}

	void setTexArea(Recti texArea) {
		this.texArea = texArea;
	}
}
