Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Toolbox/PixelTestPatterns.h @ 2012:637d6373127a
width of the vertical slider has doubled to ease user interactions
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 02 Dec 2022 18:49:06 +0100 |
parents | 7053b8a0aaec |
children | 07964689cb0b |
rev | line source |
---|---|
1275
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
1 /** |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
2 * Stone of Orthanc |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1275
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
7 * |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public License |
1275
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
10 * as published by the Free Software Foundation, either version 3 of |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
11 * the License, or (at your option) any later version. |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
12 * |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
16 * Lesser General Public License for more details. |
1275
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
17 * |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
19 * License along with this program. If not, see |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
20 * <http://www.gnu.org/licenses/>. |
1275
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
21 **/ |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
22 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
23 // PixelTestPatterns.h |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
24 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
25 #pragma once |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
26 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
27 #include "../StoneException.h" |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
28 |
1455
30deba7bc8e2
simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1283
diff
changeset
|
29 #include <Images/ImageAccessor.h> |
1275
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
30 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
31 #include <string> |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
32 #include <stdint.h> |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
33 #include <math.h> |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
34 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
35 namespace OrthancStone |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
36 { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
37 namespace PixelTestPatterns |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
38 { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
39 template<typename T, typename U> |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
40 inline uint8_t byteAddClip(T v1, U v2) |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
41 { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
42 double tmp = static_cast<double>(v1) + static_cast<double>(v2); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
43 if (tmp > 255.0) |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
44 tmp = 255; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
45 if (tmp < 0.0) |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
46 tmp = 0; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
47 return static_cast<uint8_t>(tmp+0.5); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
48 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
49 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
50 // fills the area with a horizontal gradient. |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
51 // leftmost pixels are filled with r0 g0 b0 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
52 // rightmost pixels are filled with r1 g1 b1 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
53 // linear interpolation in-between |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
54 inline void fillWithHGradient(Orthanc::ImageAccessor& target, |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
55 uint8_t r0, uint8_t g0, uint8_t b0, |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
56 uint8_t r1, uint8_t g1, uint8_t b1) |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
57 { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
58 if (target.GetFormat() != Orthanc::PixelFormat_RGBA32) { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
59 ORTHANC_ASSERT(false, "Wrong pixel format"); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
60 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
61 const unsigned int width = target.GetWidth(); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
62 const unsigned int height = target.GetHeight(); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
63 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
64 ORTHANC_ASSERT(width > 0); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
65 ORTHANC_ASSERT(height > 0); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
66 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
67 double invWidth = 1.0 / static_cast<double>(target.GetWidth()); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
68 double rIncr = (static_cast<double>(r1) - static_cast<double>(r0))* invWidth; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
69 double gIncr = (static_cast<double>(g1) - static_cast<double>(g0))* invWidth; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
70 double bIncr = (static_cast<double>(b1) - static_cast<double>(b0))* invWidth; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
71 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
72 for (unsigned int y = 0; y < height; y++) |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
73 { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
74 uint8_t r = r0; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
75 uint8_t g = g0; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
76 uint8_t b = b0; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
77 uint8_t* q = reinterpret_cast<uint8_t*>(target.GetRow(y)); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
78 for (unsigned int x = 0; x < width; x++) |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
79 { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
80 q[0] = r; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
81 q[1] = g; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
82 q[2] = b; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
83 q[3] = 255; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
84 r = byteAddClip(r, rIncr); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
85 g = byteAddClip(g, gIncr); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
86 b = byteAddClip(b, bIncr); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
87 q += 4; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
88 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
89 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
90 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
91 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
92 inline void fillWithVGradient(Orthanc::ImageAccessor& target, |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
93 uint8_t r0, uint8_t g0, uint8_t b0, |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
94 uint8_t r1, uint8_t g1, uint8_t b1) |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
95 { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
96 if (target.GetFormat() != Orthanc::PixelFormat_RGBA32) { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
97 ORTHANC_ASSERT(false, "Wrong pixel format"); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
98 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
99 const unsigned int width = target.GetWidth(); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
100 const unsigned int height = target.GetHeight(); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
101 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
102 ORTHANC_ASSERT(width > 0); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
103 ORTHANC_ASSERT(height > 0); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
104 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
105 double invHeight = 1.0 / static_cast<double>(target.GetHeight()); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
106 double rIncr = (static_cast<double>(r1) - static_cast<double>(r0))* invHeight; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
107 double gIncr = (static_cast<double>(g1) - static_cast<double>(g0))* invHeight; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
108 double bIncr = (static_cast<double>(b1) - static_cast<double>(b0))* invHeight; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
109 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
110 uint8_t r = r0; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
111 uint8_t g = g0; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
112 uint8_t b = b0; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
113 for (unsigned int y = 0; y < height; y++) |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
114 { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
115 uint8_t* q = reinterpret_cast<uint8_t*>(target.GetRow(y)); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
116 for (unsigned int x = 0; x < width; x++) |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
117 { |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
118 q[0] = r; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
119 q[1] = g; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
120 q[2] = b; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
121 q[3] = 255; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
122 q += 4; |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
123 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
124 r = byteAddClip(r, rIncr); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
125 g = byteAddClip(g, gIncr); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
126 b = byteAddClip(b, bIncr); |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
127 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
128 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
129 |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
130 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
131 } |
41d19fa749b7
Added PixelTestPattern class to debug invisible slice issues
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
132 |