background() deprecated, replace with clear() (#101)

This commit is contained in:
Abe Pazos
2020-05-16 18:00:39 +02:00
committed by GitHub
parent 7c9c87ea3f
commit b6065b7198
28 changed files with 43 additions and 43 deletions

View File

@@ -73,7 +73,7 @@ fun main() = application {
}
extend(cm)
extend {
drawer.background(0.2, 0.18, 0.16, 1.0)
drawer.clear(0.2, 0.18, 0.16, 1.0)
}
}
}

View File

@@ -379,7 +379,7 @@ class ControlManager : Extension {
}
renderTarget.bind()
program.drawer.background(ColorRGBa.BLACK.opacify(0.0))
program.drawer.clear(ColorRGBa.BLACK.opacify(0.0))
renderTarget.unbind()
renderTargetCache.forEach { (_, u) -> u.destroy() }
@@ -422,7 +422,7 @@ class ControlManager : Extension {
}
rt.bind()
drawer.background(ColorRGBa.BLACK.opacify(0.0))
drawer.clear(ColorRGBa.BLACK.opacify(0.0))
drawer.pushProjection()
drawer.ortho(rt)
@@ -486,7 +486,7 @@ class ControlManager : Extension {
}
renderTarget.bind()
program.drawer.background(ColorRGBa.BLACK.opacify(0.0))
program.drawer.clear(ColorRGBa.BLACK.opacify(0.0))
renderTarget.unbind()
}
}
@@ -507,7 +507,7 @@ class ControlManager : Extension {
body?.style?.height = program.height.px
body?.let {
program.drawer.background(ColorRGBa.BLACK.opacify(0.0))
program.drawer.clear(ColorRGBa.BLACK.opacify(0.0))
layouter.computeStyles(it)
layouter.layout(it)
drawElement(it, program.drawer, 0, 0)

View File

@@ -32,7 +32,7 @@ class Canvas : Element(ElementType("canvas")) {
drawer.isolatedWithTarget(rt) {
model = Matrix44.IDENTITY
view = Matrix44.IDENTITY
background(ColorRGBa.TRANSPARENT)
clear(ColorRGBa.TRANSPARENT)
size(screenArea.width.toInt(), screenArea.height.toInt())
ortho(rt)
userDraw?.invoke(this)