My game involves lots of geometric shapes and polygons, so I would prefer to be able to draw most of my graphics using drawing code rather than sprite assets. My issue is that when I try drawing my own custom shapes, the edges get blurry when scaling the outer container to zoom in and out, but the built-in shapes like cirlce render perfectly smooth at any scale.

This is how the blurry triangle is rendered:
image(NativeImageOrBitmap32(64, 64).context2d {
stroke(Colors.BLACK) {
fill(Colors.BLUE) {
moveTo(0.0, 0.0)
lineTo(64.0, 32.0)
lineTo(0.0, 64.0)
lineTo(0.0, 0.0)
close()
}
}
}).anchor(Anchor.CENTER)
This is how the circles are rendered:
circle {
radius = r.toDouble()
fill = Colors.DARKGRAY
}.anchor(Anchor.CENTER)
How can I render that triangle so it's not blurry when scaling?
My game involves lots of geometric shapes and polygons, so I would prefer to be able to draw most of my graphics using drawing code rather than sprite assets. My issue is that when I try drawing my own custom shapes, the edges get blurry when scaling the outer container to zoom in and out, but the built-in shapes like
cirlcerender perfectly smooth at any scale.This is how the blurry triangle is rendered:
This is how the circles are rendered:
How can I render that triangle so it's not blurry when scaling?