/// Called when source texture has changed.
void ElementCircularBar::LoadTexture()
{
	Core::ElementDocument* document = GetOwnerDocument();
	Core::URL source_url(document == NULL ? "" : document->GetSourceURL());

	Core::String source = GetProperty< Core::String >("gauge-src");

	if (!gauge_texture.Load(source, source_url.GetPath()))
	{
		gauge_geometry.SetTexture(NULL);
		return;
	}

	gauge_geometry.SetTexture(&gauge_texture);
	actual_gauge_extent = gauge_texture.GetDimensions(GetRenderInterface());
}