MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / begin

Method begin

qcustomplot.cpp:410–418  ·  view source on GitHub ↗

! Sets the QPainter::NonCosmeticDefaultPen in Qt versions before Qt5 after beginning painting on \a device. This is necessary to get cosmetic pen consistency across Qt versions, because since Qt5, all pens are non-cosmetic by default, and in Qt4 this render hint must be set to get that behaviour. The Constructor \ref QCPPainter(QPaintDevice *device) which directly starts painting also

Source from the content-addressed store, hash-verified

408 \note this function hides the non-virtual base class implementation.
409*/
410bool QCPPainter::begin(QPaintDevice *device)
411{
412 bool result = QPainter::begin(device);
413#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) // before Qt5, default pens used to be cosmetic if NonCosmeticDefaultPen flag isn't set. So we set it to get consistency across Qt versions.
414 if (result)
415 setRenderHint(QPainter::NonCosmeticDefaultPen);
416#endif
417 return result;
418}
419
420/*! \overload
421

Callers 15

paintEventMethod · 0.45
setAllFiltersMethod · 0.45
saveFilterFileMethod · 0.45
refreshIDListMethod · 0.45
updateFilterListMethod · 0.45
qcustomplot.cppFile · 0.45
spanMethod · 0.45
simplifyMethod · 0.45
enforceTypeMethod · 0.45
inverseMethod · 0.45
savePdfMethod · 0.45
mouseDoubleClickEventMethod · 0.45

Calls 1

beginFunction · 0.85

Tested by 1

calculateResultsMethod · 0.36