public void render(Bitmap bitmap, int offsetX, int offsetY){

        // Establish bounds
        int xStart = bitmap.x;
        int yStart = bitmap.y;
        int xEnd = xStart + bitmap.width;
        int yEnd = yStart + bitmap.height;

        // Bounds check
        if(xStart < 0) xStart = 0;
        if(yStart < 0) yStart = 0;
        if(xEnd > width) xEnd = width;
        if(yEnd > height) yEnd = height;

        // Render
        for(int y = yStart; y < yEnd; y++){
            for(int x = xStart; x < xEnd; x++){

                // Get color
                int color = bitmap.pixels[y * bitmap.width + x];

                // Use offset to get target position
                int target = (y + offsetY) * width + (x + offsetX);

                // If position is valid add color
                if(target < pixels.length)
                    pixels[target] = color;
            }
        }

    }