with backgroung + composition
This commit is contained in:
@ -45,11 +45,14 @@ func (layer *Layer) PutWithRawBackground(x,y int, symbol interface{}, bgColor ui
|
||||
func (layer *Layer) PutWithBackground(x,y int, symbol interface{}, bgColorName string) {
|
||||
layer.before()
|
||||
prevColor := uint32(blt.State(blt.TK_COLOR))
|
||||
prevCompMode := blt.State(blt.TK_COMPOSITION)
|
||||
c := blt.ColorFromName(bgColorName)
|
||||
blt.Color(c)
|
||||
blt.Composition(1)
|
||||
layer.Put(x,y,"█")
|
||||
blt.Color(prevColor)
|
||||
layer.Put(x,y, symbol)
|
||||
blt.Composition(prevCompMode)
|
||||
}
|
||||
|
||||
func (layer *Layer) after() *Layer {
|
||||
|
Reference in New Issue
Block a user