本文整理汇总了C++中CDisplay::TakeScreenShot方法的典型用法代码示例。如果您正苦于以下问题:C++ CDisplay::TakeScreenShot方法的具体用法?C++ CDisplay::TakeScreenShot怎么用?C++ CDisplay::TakeScreenShot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDisplay
的用法示例。
在下文中一共展示了CDisplay::TakeScreenShot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: takePauseShotLive
void UIMachineViewScale::takePauseShotLive()
{
/* Take a screen snapshot. Note that TakeScreenShot() always needs a 32bpp image: */
QImage shot = QImage(m_pFrameBuffer->width(), m_pFrameBuffer->height(), QImage::Format_RGB32);
/* If TakeScreenShot fails or returns no image, just show a black image. */
shot.fill(0);
CDisplay dsp = session().GetConsole().GetDisplay();
dsp.TakeScreenShot(screenId(), shot.bits(), shot.width(), shot.height());
m_pPauseImage = new QImage(shot);
scalePauseShot();
}
示例2: takePauseShotLive
void UIMachineView::takePauseShotLive()
{
/* Take a screen snapshot. Note that TakeScreenShot() always needs a 32bpp image: */
QImage shot = QImage(m_pFrameBuffer->width(), m_pFrameBuffer->height(), QImage::Format_RGB32);
/* If TakeScreenShot fails or returns no image, just show a black image. */
shot.fill(0);
CDisplay dsp = session().GetConsole().GetDisplay();
dsp.TakeScreenShot(screenId(), shot.bits(), shot.width(), shot.height());
/* TakeScreenShot() may fail if, e.g. the Paused notification was delivered
* after the machine execution was resumed. It's not fatal: */
if (dsp.isOk())
dimImage(shot);
m_pauseShot = QPixmap::fromImage(shot);
}