5#include "interlacingpass.h"
26InterlacingPass::InterlacingPass(
const int passCount)
28 if (!isOdd(passCount)) {
35 const int floorOfHalfCoundown = qFloor(passCount / 2.0);
36 const int baseSize = qRound(qPow(2, floorOfHalfCoundown));
38 countdown = passCount;
41 columnFrequency = baseSize;
43 lineFrequency = baseSize;
51void InterlacingPass::switchToNextPass()
59 const int floorOfHalfCoundown = qFloor(countdown / 2.0);
60 const int baseSize = qRound(qPow(2, floorOfHalfCoundown));
62 if (isOdd(countdown)) {
65 columnFrequency = baseSize;
67 lineFrequency = baseSize * 2;
68 lineOffset = baseSize;
70 const int halfBaseSize = baseSize / 2;
73 rectangleSize.
setWidth(halfBaseSize);
75 columnFrequency = baseSize;
76 columnOffset = halfBaseSize;
77 lineFrequency = baseSize;
82static_assert(std::is_trivially_copyable_v<InterlacingPass>);
84static_assert(std::is_standard_layout_v<InterlacingPass>);
The namespace of this library.
void setHeight(int height)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:18 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.