Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions mgraph440/pixelbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,14 @@ PixelRefVector PixelBase::pixelateLine( Line l, int scalefactor ) const
else {
// Special case: exactly diagonal step (should only require one step):
// (Should actually never happen) (Doesn't: checked with RFH)
a.x += 1;
pixel_list.push_back( PixelRef(a.x,parity * a.y) );
a.y += 1;
pixel_list.push_back( PixelRef(a.x,parity * a.y) );
if (a.x < b.x) {
a.x += 1;
pixel_list.push_back( PixelRef(a.x,parity * a.y) );
}
if (a.y < b.y) {
a.y += 1;
pixel_list.push_back( PixelRef(a.x,parity * a.y) );
}
}
}
}
Expand Down
12 changes: 8 additions & 4 deletions salalib/spacepix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,14 @@ PixelRefVector PixelBase::pixelateLine(Line l, int scalefactor) const {
} else {
// Special case: exactly diagonal step (should only require one step):
// (Should actually never happen) (Doesn't: checked with RFH)
a.x += 1;
pixel_list.push_back(PixelRef(a.x, parity * a.y));
a.y += 1;
pixel_list.push_back(PixelRef(a.x, parity * a.y));
if (a.x < b.x) {
a.x += 1;
pixel_list.push_back(PixelRef(a.x, parity * a.y));
}
if (a.y < b.y) {
a.y += 1;
pixel_list.push_back(PixelRef(a.x, parity * a.y));
}
}
}
}
Expand Down