Switch to Lut1d
This commit is contained in:
4
image.h
4
image.h
@@ -37,14 +37,14 @@ template <int32_t X, int32_t Y, int32_t C>
|
||||
void Image<X, Y, C>::DrawXLine(const Coord<2>& coord, const Color<C>& color, int32_t length) {
|
||||
auto& row = this->at(coord.at(1));
|
||||
|
||||
for (int32_t x = coord.at(0); x < std::min(X, coord.at(0) + length); ++x) {
|
||||
for (int32_t x = coord.at(0); x < std::min(X - 1, coord.at(0) + length); ++x) {
|
||||
row.at(x) = color;
|
||||
}
|
||||
}
|
||||
|
||||
template <int32_t X, int32_t Y, int32_t C>
|
||||
void Image<X, Y, C>::DrawYLine(const Coord<2>& coord, const Color<C>& color, int32_t length) {
|
||||
for (int32_t y = coord.at(1); y <= std::min(Y, coord.at(1) + length); ++y) {
|
||||
for (int32_t y = coord.at(1); y <= std::min(Y - 1, coord.at(1) + length); ++y) {
|
||||
SetPixel({{{{coord.at(0), y}}}}, color);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user