Changeset View
Changeset View
Standalone View
Standalone View
abstract_output.cpp
Show All 11 Lines | |||||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | | ||||
20 | #include "abstract_output.h" | 21 | #include "abstract_output.h" | ||
21 | 22 | | |||
22 | // KF5 | 23 | namespace KWin | ||
23 | #include <KLocalizedString> | 24 | { | ||
24 | 25 | | |||
25 | #include <cmath> | 26 | GammaRamp::GammaRamp(uint32_t size) | ||
27 | : m_table(3 * size) | ||||
28 | , m_size(size) | ||||
29 | { | ||||
30 | } | ||||
26 | 31 | | |||
27 | namespace KWin | 32 | uint32_t GammaRamp::size() const | ||
28 | { | 33 | { | ||
34 | return m_size; | ||||
35 | } | ||||
36 | | ||||
37 | uint16_t *GammaRamp::red() | ||||
38 | { | ||||
39 | return m_table.data(); | ||||
40 | } | ||||
41 | | ||||
42 | const uint16_t *GammaRamp::red() const | ||||
43 | { | ||||
44 | return m_table.data(); | ||||
45 | } | ||||
46 | | ||||
47 | uint16_t *GammaRamp::green() | ||||
48 | { | ||||
49 | return m_table.data() + m_size; | ||||
50 | } | ||||
51 | | ||||
52 | const uint16_t *GammaRamp::green() const | ||||
53 | { | ||||
54 | return m_table.data() + m_size; | ||||
55 | } | ||||
56 | | ||||
57 | uint16_t *GammaRamp::blue() | ||||
58 | { | ||||
59 | return m_table.data() + 2 * m_size; | ||||
60 | } | ||||
61 | | ||||
62 | const uint16_t *GammaRamp::blue() const | ||||
63 | { | ||||
64 | return m_table.data() + 2 * m_size; | ||||
65 | } | ||||
29 | 66 | | |||
30 | AbstractOutput::AbstractOutput(QObject *parent) | 67 | AbstractOutput::AbstractOutput(QObject *parent) | ||
31 | : QObject(parent) | 68 | : QObject(parent) | ||
32 | { | 69 | { | ||
33 | } | 70 | } | ||
34 | 71 | | |||
35 | AbstractOutput::~AbstractOutput() | 72 | AbstractOutput::~AbstractOutput() | ||
36 | { | 73 | { | ||
37 | } | 74 | } | ||
38 | 75 | | |||
39 | } | 76 | } |