void ScreenArea::vSetSize(int _iWidth, int _iHeight)
{
    g_return_if_fail(_iWidth >= 1 && _iHeight >= 1);

    if (_iWidth != m_iWidth || _iHeight != m_iHeight) {
        m_iWidth = _iWidth;
        m_iHeight = _iHeight;
        vUpdateSize();
    }
}
void ScreenArea::vSetFilter(EFilter _eFilter)
{
    m_vFilter2x = pvGetFilter(_eFilter, FilterDepth32);

    m_iFilterScale = 1;
    if (m_vFilter2x != NULL) {
        m_iFilterScale = 2;
    }

    vUpdateSize();
}
void ScreenArea::vSetScale(int _iScale)
{
    g_return_if_fail(_iScale >= 1);

    if (_iScale == 1) {
        vSetFilter(FilterNone);
    }

    m_iScale = _iScale;
    vUpdateSize();
}
Example #4
0
ScreenAreaGl::ScreenAreaGl(int _iWidth, int _iHeight, int _iScale) :
  ScreenArea(_iWidth, _iHeight, _iScale),
  m_uiScreenTexture(0),
  m_iTextureSize(0)
{
  Glib::RefPtr<Gdk::GL::Config> glconfig;

  glconfig = Gdk::GL::Config::create(Gdk::GL::MODE_RGB    |
                                     Gdk::GL::MODE_DOUBLE);
  if (!glconfig)
    {
      fprintf(stderr, _("*** OpenGL : Cannot open display.\n"));
      throw std::exception();
    }

  set_gl_capability(glconfig);

  vUpdateSize();
}
ScreenAreaCairo::ScreenAreaCairo(int _iWidth, int _iHeight, int _iScale)
    : ScreenArea(_iWidth, _iHeight, _iScale)
{
    vUpdateSize();
}