QGIS API Documentation  3.22.4-Białowieża (ce8e65e95e)
qgspaintenginehack.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgspaintenginehack.cpp
3  Hack paint engine flags
4  -------------------
5  begin : July 2012
6  copyright : (C) Juergen E. Fischer
7  email : jef at norbit dot de
8 
9  ***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "qgspaintenginehack.h"
19 
20 // Hack to workaround Qt #5114 by disabling PatternTransform
22 {
23  gccaps = PaintEngineFeatures();
24  gccaps |= ( QPaintEngine::PrimitiveTransform
25  // | QPaintEngine::PatternTransform
26  | QPaintEngine::PixmapTransform
27  | QPaintEngine::PatternBrush
28  // | QPaintEngine::LinearGradientFill
29  // | QPaintEngine::RadialGradientFill
30  // | QPaintEngine::ConicalGradientFill
31  | QPaintEngine::AlphaBlend
32  // | QPaintEngine::PorterDuff
33  | QPaintEngine::PainterPaths
34  | QPaintEngine::Antialiasing
35  | QPaintEngine::BrushStroke
36  | QPaintEngine::ConstantOpacity
37  | QPaintEngine::MaskedBrush
38  // | QPaintEngine::PerspectiveTransform
39  | QPaintEngine::BlendModes
40  // | QPaintEngine::ObjectBoundingModeGradients
41  | QPaintEngine::RasterOpModes
42  | QPaintEngine::PaintOutsidePaintEvent
43  );
44 }
45 
46 void QgsPaintEngineHack::fixEngineFlags( QPaintEngine *engine )
47 {
48  if ( !engine )
49  return;
50 
51  QgsPaintEngineHack *hack = static_cast<QgsPaintEngineHack *>( engine );
52  hack->fixFlags();
53 }
Hack to workaround Qt #5114 by disabling PatternTransform.
static void fixEngineFlags(QPaintEngine *engine)