Example #1
0
func write1Gr(s byte, x, y int) {
	//
	if underX {
		t := string(s)
		z.ToHellWithUTF8(&t)
		xker.Write(t, x, y, transparent)
		return
	}
	if !visible ||
		x < 0 || x >= int(nX[mode]-actualCharwidth) ||
		y < 0 || y >= int(nY[mode]-actualCharheight) {
		return
	}
	CF := col.CodeF
	LB := actualLinewidth
	actualLinewidth = Thin
	for Y := uint(0); Y < actualCharheight; Y++ {
		for X := uint(0); X < actualCharwidth; X++ {
			if pointed(actualFontsize, s, Y, X) {
				col.CodeF = CF
				point(x+int(X), y+int(Y))
			} else if !transparent {
				col.CodeF = col.CodeB
				point(x+int(X), y+int(Y))
			}
		}
	}
	col.CodeF = CF
	actualLinewidth = LB
}
Example #2
0
func writeGr(s string, x, y int) {
	//
	z.ToHellWithUTF8(&s)
	n := len(s)
	if n == 0 {
		return
	}
	if underX {
		xker.Write(s, x, y, transparent)
		return
	}
	if !visible || x < 0 || y < 0 {
		return
	}
	if n == 0 {
		ker.Stop(pack, 3)
	}
	for i := 0; i < n; i++ {
		write1Gr(s[i], x+i*int(actualCharwidth), y)
	}
}
Example #3
0
func write(S string, L, C uint) {
	//
	n := len(S)
	if C+uint(n) > nColumns {
		n = int(nColumns - C)
	}
	if n == 0 {
		return
	}
	z.ToHellWithUTF8(&S)
	n = len(S)
	if underX {
		xker.Write(S, int(C*actualCharwidth), int(L*actualCharheight), transparent)
	} else {
		if !visible {
			return
		}
		for s := 0; s < n; s++ {
			write1(S[s], L, C+uint(s))
		}
	}
}