You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Added an experimental DrawFrameOnScene method, which takes a raw pointer (as a long) from PyQt5 (i.e. unwrapped by sip), and draws a QBitmap on it.
This commit is contained in:
@@ -204,3 +204,16 @@ void ReaderBase::SetJsonValue(Json::Value root) {
|
||||
info.audio_timebase.den = root["audio_timebase"]["den"].asInt();
|
||||
}
|
||||
}
|
||||
|
||||
// Test method to draw a bitmap on a Qt QGraphicsScene
|
||||
void ReaderBase::DrawFrameOnScene(string path, long _graphics_scene_address) {
|
||||
|
||||
// Get pixmap
|
||||
QGraphicsScene *scene = reinterpret_cast<QGraphicsScene*>(_graphics_scene_address);
|
||||
QGraphicsPixmapItem *item = new QGraphicsPixmapItem(QPixmap(QString(path.c_str())));
|
||||
scene->addItem(item);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user