git: 9front

Download patch

ref: ec19e34a30aef38a94bcfe64dc7004127c584e47
parent: 5f97733f919c985a577a5bdbc697ef13a5fa5a15
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Sep 22 07:49:07 EDT 2015

mothra: <hr> drawing

<hr> is handled by drawing replicated bitmap across the with of
the page.

--- a/sys/src/cmd/mothra/libpanel/rtext.c
+++ b/sys/src/cmd/mothra/libpanel/rtext.c
@@ -88,7 +88,7 @@
 			if(tp->b){
 				a=tp->b->r.max.y-tp->b->r.min.y+BORD;
 				d=BORD;
-				w=tp->b->r.max.x-tp->b->r.min.x+BORD*2;
+				w=tp->b->repl?wid-x:tp->b->r.max.x-tp->b->r.min.x+BORD*2;
 			}
 			else if(tp->p){
 				/* what if plpack fails? */
@@ -134,7 +134,7 @@
 			if(t->b){
 				t->r.max.y=p.y+BORD;
 				t->r.min.y=p.y-(t->b->r.max.y-t->b->r.min.y)-BORD;
-				p.x+=(t->b->r.max.x-t->b->r.min.x)+BORD*2;
+				p.x+=t->b->repl?wid-p.x:(t->b->r.max.x-t->b->r.min.x)+BORD*2;
 			}
 			else if(t->p){
 				t->r.max.y=p.y;
--