blob: 26a95566d401faeb7c7ad05db72109794cb476a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QRegion>
namespace src_gui_painting_qregion_unix {
void wrapper() {
//! [0]
QRegion r1(10, 10, 20, 20);
r1.isEmpty(); // false
QRegion r3;
r3.isEmpty(); // true
QRegion r2(40, 40, 20, 20);
r3 = r1.intersected(r2); // r3: intersection of r1 and r2
r3.isEmpty(); // true
r3 = r1.united(r2); // r3: union of r1 and r2
r3.isEmpty(); // false
//! [0]
} // wrapper
} // src_gui_painting_qregion_unix
|