summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorFrederic Cambus <fcambus@cvs.openbsd.org>2018-01-23 10:10:33 +0000
committerFrederic Cambus <fcambus@cvs.openbsd.org>2018-01-23 10:10:33 +0000
commit01bcf7e2a506dfe544648673ee50656a73bbf566 (patch)
tree0e12e67e104c2ed81ad4ad32537edaf50ed24838 /sys
parent40fc31874d4278f437a612df57371a4bfb5f12b4 (diff)
Fix underline rotation on CCW (quarter counter-clockwise) rotated
screens. The "underline" was actually drawn above text. OK jcs@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/rasops/rasops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c
index 27b605eaac0..956f2a5fb48 100644
--- a/sys/dev/rasops/rasops.c
+++ b/sys/dev/rasops/rasops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rasops.c,v 1.49 2017/12/23 10:30:25 fcambus Exp $ */
+/* $OpenBSD: rasops.c,v 1.50 2018/01/23 10:10:32 fcambus Exp $ */
/* $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $ */
/*-
@@ -1247,6 +1247,8 @@ rasops_putchar_rotated(void *cookie, int row, int col, u_int uc, long attr)
/* Do rotated underline */
rp = ri->ri_bits + col * ri->ri_yscale + row * ri->ri_xscale;
+ if (ri->ri_flg & RI_ROTATE_CCW)
+ rp += (ri->ri_font->fontwidth - 1) * ri->ri_pelbytes;
height = ri->ri_font->fontheight;
/* XXX this assumes 16-bit color depth */