[orx-poisson-fill] Add content scale support
This commit is contained in:
@@ -42,18 +42,16 @@ class PoissonFiller(val width: Int, val height: Int, type: ColorType = ColorType
|
||||
class PoissonFill : Filter() {
|
||||
private var filler: PoissonFiller? = null
|
||||
override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>) {
|
||||
|
||||
if (target.isNotEmpty()) {
|
||||
|
||||
filler?.let {
|
||||
if (it.width != target[0].width || it.height != target[0].height) {
|
||||
if (it.width != target[0].effectiveWidth || it.height != target[0].effectiveHeight) {
|
||||
it.destroy()
|
||||
filler = null
|
||||
}
|
||||
}
|
||||
|
||||
if (filler == null) {
|
||||
filler = PoissonFiller(target[0].width, target[0].height)
|
||||
filler = PoissonFiller(target[0].effectiveWidth, target[0].effectiveHeight)
|
||||
}
|
||||
|
||||
filler?.let {
|
||||
|
||||
Reference in New Issue
Block a user