[mpy/kandinsky] Fix draw_string() on new line + good colors (#47)

* [mpy/kandinsky] Use good colors

* [kandinsky/context_text] Avoid returning to pos x=0 on new line, use arg's x coordinate instead
This commit is contained in:
ArtichautCosmique
2021-10-11 20:25:03 +02:00
committed by GitHub
parent 9cda9d9e59
commit 0906dc919b
2 changed files with 3 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ KDPoint KDContext::pushOrPullString(const char * text, KDPoint p, const KDFont *
codePointPointer = decoder.stringPosition();
if (codePoint == UCodePointLineFeed) {
assert(position.y() < KDCOORDINATE_MAX - glyphSize.height());
position = KDPoint(0, position.y() + glyphSize.height());
position = KDPoint(p.x(), position.y() + glyphSize.height());
codePoint = decoder.nextCodePoint();
} else if (codePoint == UCodePointTabulation) {
position = position.translatedBy(KDPoint(k_tabCharacterWidth * glyphSize.width(), 0));