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#include <QtWidgets>
4
5namespace picture {
6void wrapper0()
7{
8//! [0]
9QPicture picture;
10QPainter painter;
11painter.begin(&picture); // paint in picture
12painter.drawEllipse(10,20, 80,70); // draw an ellipse
13painter.end(); // painting done
14picture.save("drawing.pic"); // save picture
15//! [0]
16
17} // wrapper0
18
19
20void wrapper1() {
21QImage myImage;
22
23//! [1]
24QPicture picture;
25picture.load("drawing.pic"); // load picture
26QPainter painter;
27painter.begin(&myImage); // paint in myImage
28painter.drawPicture(0, 0, picture); // draw the picture at (0,0)
29painter.end(); // painting done
30//! [1]
31
32} // wrapper1
33} // picture
void wrapper1()
Definition picture.cpp:20
void wrapper0()
Definition picture.cpp:6