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