Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circles are rendered incorrectly #2303

Open
mrbubble opened this issue Oct 27, 2024 · 0 comments
Open

Circles are rendered incorrectly #2303

mrbubble opened this issue Oct 27, 2024 · 0 comments

Comments

@mrbubble
Copy link

Circles don't close completely, you can see an opening on the right side.

Code:

import korlibs.image.bitmap.*
import korlibs.image.color.*
import korlibs.korge.*
import korlibs.korge.scene.*
import korlibs.korge.view.*
import korlibs.korge.view.align.*
import korlibs.math.geom.*

suspend fun main() = Korge(windowSize = Size(512, 512), backgroundColor = Colors["#2b2b2b"]) {
    val sceneContainer = sceneContainer()

    sceneContainer.changeTo { MyScene() }
}

class MyScene : Scene() {
    override suspend fun SContainer.sceneMain() {
        val cellSize = 128
        image(Bitmap32(cellSize, cellSize).context2d {
            val margin = 20
            stroke(Colors.GREEN, lineWidth = 6) {
                circle(Point(cellSize / 2, cellSize / 2), (cellSize - margin) / 2)
            }
        }) {
            centerOn(this@sceneMain)
        }
    }
}

Output:
korge-circle-bug

System:
macOS M1 Sonoma 14.6.1

Korge:
KorGE Forge 2024.2.0.2 (Fenix Edition)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending
Development

No branches or pull requests

1 participant