#include "subtitle.h"
#include "region.h"
#include "configuration.h"
#include <vdr/osdbase.h>

cSubtitle::cSubtitle(Region* region)
    : x(0), y(0),bitmap(0)
{
    if (region != 0 && region->Canvas() != 0)
    {
	x = region->X();
	y = region->Y();
	bitmap = new cBitmap(region->Width(), region->Height(), gSubtitlesConfiguration.dxr3comp?2:4);
	bitmap->DrawBitmap(0,0,*region->Canvas());
    }
}
cSubtitle::~cSubtitle()
{
    delete bitmap;
}
