Successful label printing

This commit is contained in:
2023-09-24 18:08:18 +02:00
parent b940890268
commit 4b3247ef6d
4 changed files with 30 additions and 11 deletions

View File

@@ -73,11 +73,13 @@ std::optional<std::vector<T>> Bitmap<T>::getCol(uint16_t col) {
// first pixel is always beginning of the col
std::vector<T> colPixels(mHeight);
auto it = mPixels.begin() + col;
auto it = std::next(mPixels.begin(), col);
for (auto& colElement : colPixels) {
int offset = std::distance(mPixels.begin(), it);
//spdlog::debug("Distance {}: {}", offset, *it);
colElement = *it;
it += mWidth;
std::advance(it, mWidth);
}
return colPixels;