Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
picture.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QPicture>
5#include <QPainter>
6
7namespace picture {
8void wrapper0()
9{
10//! [0]
11QPicture picture;
12QPainter painter;
13painter.begin(&picture); // paint in picture
14painter.drawEllipse(10,20, 80,70); // draw an ellipse
15painter.end(); // painting done
16picture.save("drawing.pic"); // save picture
17//! [0]
18
19} // wrapper0
20
21
22void wrapper1() {
23QImage myImage;
24
25//! [1]
26QPicture picture;
27picture.load("drawing.pic"); // load picture
28QPainter painter;
29painter.begin(&myImage); // paint in myImage
30painter.drawPicture(0, 0, picture); // draw the picture at (0,0)
31painter.end(); // painting done
32//! [1]
33
34} // wrapper1
35} // picture
void wrapper1()
Definition picture.cpp:22
void wrapper0()
Definition picture.cpp:8