This could be a dumb question :grimacing:. How do ...
# compose-desktop
t
This could be a dumb question ๐Ÿ˜ฌ. How do I
drawImage
(
Canvas
) with "pixelated" output?
r
You mean when you scale the image?
t
Yes
When I zoom the input image, the output looks like this. (pixelated)
r
In the
Paint
you pass to
drawImage
set the
filterQuality
to
None
I believe
t
and when I
drawImage
, it looks like this.
@romainguy Okay, let me try that.
@romainguy Looks like there's no
Paint
param ๐Ÿค”
t
okay, I think i need to use
drawIntoCanvas
then
but then the problem is
Canvas#drawImage
doesn't accept
srcOffset
๐Ÿ˜ฌ. It got only destination offset(
topLeftOffset
)
Also doesn't have
dstSize
๐Ÿ˜ž I think i have to do all thse manually now.
androidx.compose.ui.graphics.drawscope.DrawScope#drawImage
was easier
It would be great if
DrawScope#drawImage
can accept
Paint
object ๐Ÿ˜ฌ
Ohh I didn't knw abt that method ๐Ÿ˜ฎ
It worked android dance
Thanks @Aaron Yoder @romainguy ๐Ÿ™‡
a
Sorry, deleted my comment because I thought I misunderstood the question after looking at the documentation, but apparently not. ๐Ÿ˜… For anyone else: use
Canvas#drawImageRect
t
๐Ÿ˜„ ๐Ÿ‘
c
@theapache64 can't wait to play Super Mario Compose. ๐Ÿ˜„