- Increase draw velocity by removing points which are shown on the same pixel in the scene
- Don't retransform curve if it is not visible
Details
Diff Detail
- Repository
- R262 LabPlot
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/backend/worksheet/plots/cartesian/XYCurve.cpp | ||
---|---|---|
931 | this is not required since we check this already in line 892. | |
965 | this logic is not quite correct since we can have DateTime on the x-axis and Numeric or Integer on the y-axis or the other way around. | |
975 | wouldn't an 'or' be even better here? Please put 'continue' to the next line. |
src/backend/worksheet/plots/cartesian/XYCurve.cpp | ||
---|---|---|
918 | What is the reason for this if? | |
949 | use std::swap(startIndex, endIndex) | |
959 | one tab too much here. Please also break the parameters, let's avoid such long lines. | |
963 | remove these empty lines. | |
1052 | minLogicalDiffY is not used in this function. | |
1053 | samePixel() is only used once here. Let's add this logic directly inside of XYCurvePrivate::addLine(). | |
1055 | we don't use brackets for one-line statements. | |
1113 | remove this empty line. | |
1175 | use std::swap(startIndex, endIndex) | |
1270 | this part comes after the break. Is this intended? | |
1289 | this part comes after the break. Is this intended? |
The patch look ok. Please check the behavior caused by if (symbolsStyle != Symbol::NoSymbols || valuesType != XYCurve::NoValues ) again and land this nice improvement.
src/backend/worksheet/plots/cartesian/XYCurve.cpp | ||
---|---|---|
918 | symbolPointsLogical is also used in updateErrorBars(), updateDropLines() and in updateFilling(). So, even if we don't show any symbols and values, we still need these points for error bars, for the drop lines and for the filling below/above the curve. |
- add casts to suppress warnings
- remove condition to not recalculate logical points, because they are needed in some cases