Cursor support
This commit is contained in:
parent
927e7c4165
commit
446440aca9
@ -10,10 +10,11 @@
|
|||||||
QPixmap *screenshotutil::fullscreen() {
|
QPixmap *screenshotutil::fullscreen() {
|
||||||
QPixmap *noCursor = window(0);
|
QPixmap *noCursor = window(0);
|
||||||
QScopedPointer<QPixmap> p(noCursor);
|
QScopedPointer<QPixmap> p(noCursor);
|
||||||
QPixmap *withCursor = new QPixmap(noCursor->size());
|
QPixmap *withCursor = new QPixmap(*noCursor);
|
||||||
QPainter painter(withCursor);
|
QPainter painter(withCursor);
|
||||||
auto cursorData = PlatformBackend::inst().getCursor();
|
auto cursorData = PlatformBackend::inst().getCursor();
|
||||||
painter.drawPixmap(std::get<0>(cursorData), std::get<1>(cursorData));
|
painter.drawPixmap(QCursor::pos() - std::get<0>(cursorData), std::get<1>(cursorData));
|
||||||
|
painter.end();
|
||||||
return withCursor;
|
return withCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user