예제 #1
0
파일: Bitmap.cpp 프로젝트: macsux/XCSoar
bool
Bitmap::Reload()
{
  assert(id != 0);
  assert(texture == NULL);

  texture = LoadResourceTexture(id);
  if (texture == NULL)
    return false;

  width = texture->get_width();
  height = texture->get_height();
  return true;
}
예제 #2
0
파일: Bitmap.cpp 프로젝트: damianob/xcsoar
bool
Bitmap::Reload()
{
  assert(id != 0 || !pathName.empty());
  assert(texture == NULL);

  texture = (id != 0) ? LoadResourceTexture(id) :
                        LoadFileTexture(pathName.c_str());
  if (texture == NULL)
    return false;

  size.cx = texture->GetWidth();
  size.cy = texture->GetHeight();
  return true;
}
예제 #3
0
파일: Bitmap.cpp 프로젝트: Adrien81/XCSoar
bool
Bitmap::Reload()
{
  assert(id.IsDefined() || !pathName.empty());
  assert(texture == nullptr);

  texture = id.IsDefined()
    ? LoadResourceTexture(id, type)
    : LoadFileTexture(pathName.c_str());
  if (texture == nullptr)
    return false;

  size.cx = texture->GetWidth();
  size.cy = texture->GetHeight();
  return true;
}