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