Skip to content

Conversation

@FSaurenbach
Copy link
Member

@FSaurenbach FSaurenbach commented Sep 20, 2025

Any reason not to use scaledHeight?

var settings = image(resourcesVfs["settings.svg"].readSVG().scaled(1, 1).render()) {
            zIndex(3)
            position(10, offsetY / 2)

            scale(0.2)
        }
        println("SETTINGS HEIGHT: ${settings.height}") // 400 (incorrect)
        println("SETTINGS HEIGHT: ${settings.scaledHeight}") // 80 (correct)
        settings.centerYBetween(offsetY, 0.0) // -197 or smth

centerYBetween does - height (minus) and then here in the snippet it will center the viewY on -197

BTW: If this gets merged, the same applies to animators (scaleTo()) too.

@jobe-m jobe-m merged commit 1042cf7 into korlibs:main Sep 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants