mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 04:31:34 +08:00
Fix for Canvas::DrawText() draws nothing if the start coordinate is out of bounds.
This commit is contained in:
parent
f91677e79f
commit
d5044bdaaf
@ -802,6 +802,7 @@ void Canvas::DrawText(int x,
|
|||||||
const Stylizer& style) {
|
const Stylizer& style) {
|
||||||
for (const auto& it : Utf8ToGlyphs(value)) {
|
for (const auto& it : Utf8ToGlyphs(value)) {
|
||||||
if (!IsIn(x, y)) {
|
if (!IsIn(x, y)) {
|
||||||
|
x += 2;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Cell& cell = storage_[XY{x / 2, y / 4}];
|
Cell& cell = storage_[XY{x / 2, y / 4}];
|
||||||
|
Loading…
Reference in New Issue
Block a user