#include "background.h"

Background::Background(const char *path) : Element(path)
{
    ALLEGRO_BITMAP * aux;

    aux = al_create_bitmap(gw, gh);
    al_set_target_bitmap(aux);
    al_draw_scaled_bitmap(getBitmap(), 0, 0, getW(), getH(), 0, 0, gw, gh, 0);

    setBitmap(aux);
    setW(gw);
    setH(gh);

    al_destroy_bitmap(aux);
}
