Brian G
01/17/2022, 5:26 PMBrian G
01/17/2022, 5:29 PMallan.conda
01/17/2022, 5:29 PMModifier.graphicsLayer
could be useful for you?Brian G
01/17/2022, 5:30 PMModifier.scale(2f)
Just calls Modifier.graphicsLayer(scaleX=2f, scaleY=2f)
Brian G
01/17/2022, 5:31 PMDp
size correctly, but it's still drawing at native resolution, as you can see by the rendering artifacts. In the above screenshot I'm using scale(4f)
and then drawing some bitmaps.Brian G
01/17/2022, 5:31 PMBrian G
01/17/2022, 5:32 PMBrian G
01/17/2022, 5:37 PMscale(4f)
to make the "pixels" bigger.Brian G
01/17/2022, 6:01 PMgraphicsLayer(scaleX=2f, scaleY=2f, transformOrigin=TransformOrigin(0f, 0f))
and Alignment.TopStart
Brian G
01/17/2022, 6:06 PMallan.conda
01/17/2022, 6:23 PMAlbert Chang
01/18/2022, 12:16 AMLocalDensity
.Brian G
02/05/2022, 10:47 PMBrian G
02/05/2022, 10:48 PMBox(
Modifier.align(Alignment.TopStart)
.graphicsLayer(
scaleX = dpScale,
scaleY = dpScale,
transformOrigin = TransformOrigin(0f, 0f)
)
.fillMaxSize(1/dpScale)
) {
CompositionLocalProvider(LocalDensity provides Density(1f)) {
// App code here
}
}