Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void BackgroundLayer::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
- {
- painter->drawImage( QRectF(dx1, dy1, dx2-dx1, dy2-dy1), shownImage, QRectF(sx1, sy1, sx2-sx1, sy2-sy1) );
- }
- void ForegroundLayer::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
- {
- QPen pen(Qt::red, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
- painter->setPen(pen);
- painter->drawLine(p1, p2);
- }
- Rectangle {
- width: 1920
- height: 1080
- BackgroundLayer{
- id: background_layer
- anchors.fill: parent
- }
- ForegroundLayer {
- id: foreground_layer
- anchors.fill: parent
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement