Brian G
01/17/2022, 5:26 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)
Dp
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.scale(4f)
to make the "pixels" bigger.graphicsLayer(scaleX=2f, scaleY=2f, transformOrigin=TransformOrigin(0f, 0f))
and Alignment.TopStart
allan.conda
01/17/2022, 6:23 PMAlbert Chang
01/18/2022, 12:16 AMLocalDensity
.Brian G
02/05/2022, 10:47 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
}
}