background() deprecated, replace with clear() (#101)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user