https://kotlinlang.org logo
#korge
Title
# korge
s

Sahil Bajaj

11/23/2021, 6:28 AM
Hey Carlos, @Deactivated User So we’ve been working with filters on korge. We’ve noticed an issue. When we apply a filter on a ClipContainer (with translation), the clip is applied incorrectly and the output is cropped.
Copy code
override suspend fun Container.sceneMain() {

    val filterContainer = ClipContainer()

    filterContainer.setSize(400.0, 600.0)
    filterContainer.pos = Point(100.0, 100.0)

    this.addChild(filterContainer)

    val image = Image(resourcesVfs["test_image.jpg"].readBitmap().slice())
    image.setSize(400.0, 600.0)
    filterContainer.addChild(image)

    val filter = LUTFilter("underwater.png")
    filterContainer.addFilter(filter)
}
Attaching the screenshots (when translation is 0,0).. and with incorrect cropping (when translation is 100,100)
@Deactivated User Not sure if you’re back from holidays. just bringing this one up
d

Deactivated User

12/13/2021, 2:15 PM
Hey 👋 @Sahil Bajaj can you create an issue at github?
s

Sahil Bajaj

12/13/2021, 2:49 PM
4 Views