Antialias line drawing characters

Summary:
BUG: 397985

Use antialiasing when drawing unicode box characters to improve the
rendering of rounded corners.

Test Plan:
# Execute `echo -e '\u256d\u256e\n\u2570\u256f'`
# The box should have rounded corners

Before fix:

{F6301318}

After fix:

{F6301319}

Reviewers: #konsole, hindenburg

Reviewed By: #konsole, hindenburg

Subscribers: ngraham, konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D15915
wilder-portage
Kurt Hindenburg 8 years ago
parent f5cc6d6c90
commit ed5fa1f855
  1. 5
      src/TerminalDisplay.cpp

@ -783,6 +783,9 @@ static void drawOtherChar(QPainter& paint, int x, int y, int w, int h, uchar cod
void TerminalDisplay::drawLineCharString(QPainter& painter, int x, int y, const QString& str,
const Character* attributes)
{
painter.save();
painter.setRenderHint(QPainter::Antialiasing);
const QPen& originalPen = painter.pen();
if (((attributes->rendition & RE_BOLD) != 0) && _boldIntense) {
@ -800,7 +803,7 @@ void TerminalDisplay::drawLineCharString(QPainter& painter, int x, int y, const
}
}
painter.setPen(originalPen);
painter.restore();
}
void TerminalDisplay::setKeyboardCursorShape(Enum::CursorShapeEnum shape)

Loading…
Cancel
Save