precomputed shade algo, viewport basic render
This commit is contained in:
@ -36,10 +36,14 @@ func (layer *Layer) WithColor(colorName string) *Layer {
|
||||
func (layer *Layer) PutWithRawBackground(x,y int, symbol interface{}, bgColor uint32) {
|
||||
layer.before()
|
||||
prevColor := uint32(blt.State(blt.TK_COLOR))
|
||||
prevCompMode := blt.State(blt.TK_COMPOSITION)
|
||||
blt.Color(bgColor)
|
||||
blt.Composition(1)
|
||||
layer.Put(x,y,"█")
|
||||
blt.Color(prevColor)
|
||||
layer.Put(x,y, symbol)
|
||||
blt.Composition(prevCompMode)
|
||||
|
||||
}
|
||||
|
||||
func (layer *Layer) PutWithBackground(x,y int, symbol interface{}, bgColorName string) {
|
||||
|
Reference in New Issue
Block a user