34 if (
cols.size() < 1 ||
rows.size() < 1)
37 std::vector<DWORD> cell_x;
38 std::vector<DWORD> cell_y;
51 else if (c.
x >= (
int)cell_x.size()) c.
x = cell_x.size() - 1;
53 else if (c.
y >= (
int)cell_y.size()) c.
y = cell_y.size() - 1;
54 if (c.
x+c.
w >= (
int)cell_x.size()) c.
w = cell_x.size() - c.
x - 1;
55 if (c.
y+c.
h >= (
int)cell_y.size()) c.
h = cell_y.size() - c.
y - 1;
129 for (
auto cit =
cols.begin(); cit !=
cols.end(); ++cit)
132 for (
auto rit =
rows.begin(); rit !=
rows.end(); ++rit)
142 for (
auto cit =
cols.begin(); cit !=
cols.end(); ++cit) {
148 for (
auto rit =
rows.begin(); rit !=
rows.end(); ++rit) {
169 cols.push_back(min_width);
176 rows.push_back(min_height);
182 const std::vector<DWORD>& min_y,
183 const std::vector<float>& weight_x,
184 const std::vector<float>& weight_y)
188 if (min_x.size() == weight_x.size() && min_y.size() == weight_y.size()) {
189 for (
auto iter = min_x.begin(); iter != min_x.end(); ++iter)
190 cols.push_back(*iter);
192 for (
auto iter = min_y.begin(); iter != min_y.end(); ++iter)
193 rows.push_back(*iter);
195 for (
auto iter = weight_x.begin(); iter != weight_x.end(); ++iter)
198 for (
auto iter = weight_y.begin(); iter != weight_y.end(); ++iter)
205 const std::vector<float>& min_y,
206 const std::vector<float>& weight_x,
207 const std::vector<float>& weight_y)
211 if (min_x.size() == weight_x.size() &&
212 min_y.size() == weight_y.size()) {
214 for (
auto iter = min_x.begin(); iter != min_x.begin(); ++iter)
215 cols.push_back((DWORD) *iter);
217 for (
auto iter = min_y.begin(); iter != min_y.begin(); ++iter)
218 rows.push_back((DWORD) *iter);
220 for (
auto iter = weight_x.begin(); iter != weight_x.end(); ++iter)
223 for (
auto iter = weight_y.begin(); iter != weight_y.end(); ++iter)
233 const float* weight_x,
234 const float* weight_y)
238 if (nrows > 0 && ncols > 0) {
241 for (i = 0; i < ncols; i++) {
242 cols.push_back(min_x[i]);
246 for (i = 0; i < nrows; i++) {
247 rows.push_back(min_y[i]);