namespace ImageResources {
    public class ImageResource {

        // top-left location within the _nativeResource
        // TODO: friend assemblies. These are used by Graphics2D but I don't want them to be public
        public NativeImageData _nativeResource;
        public int _width;
        public int _height;
        public int _x = 0;
        public int _y = 0;

        // TODO: create static factory methods and make this private.
        // The init parameter really needs to be hidden from access.
        public constructor(int width, int height, bool init = true) {
            this._width = width;
            this._height = height;
            if (init) {
                List<object> size = new List<object>() { width, height };
                this._nativeResource = new NativeImageData(NativeImageDataConstructionType.SIZE, size);
            }
        }

        // TODO: convert these fields to Acrylic properties and so these getters can go away.
        public int getWidth() { return this._width; }
        public int getHeight() { return this._height; }
    }

    public NativeImageData getNativeImageData(ImageResource img){
        return img._nativeResource;
    }
}
