mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[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:
committed by
GitHub
parent
9cda9d9e59
commit
0906dc919b
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user