Fix #441 Canvas::DrawText() (#442)

Fix for Canvas::DrawText() draws nothing if the start coordinate is out
of bounds.
This commit is contained in:
badlydrawnrod
2022-07-10 21:14:32 +01:00
committed by GitHub
parent f91677e79f
commit d5044bdaaf

View File

@@ -802,6 +802,7 @@ void Canvas::DrawText(int x,
const Stylizer& style) {
for (const auto& it : Utf8ToGlyphs(value)) {
if (!IsIn(x, y)) {
x += 2;
continue;
}
Cell& cell = storage_[XY{x / 2, y / 4}];