• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Painting a bitmap to a canvas with stretch

badkarma

Newbie
Jan 5, 2011
12
1
Hi all,

I have looked all around Google and these forums for 'Android' + 'Stretch(ing)' + 'Bitmap' but there appears no solution to my problem.

I have (lots of) 8x8 pixel images and would like to paint them to the canvas in 16x16 pixl fomat (i.e. double size).

I have reseached densities etc but this is not what I need.

I need a function like:

canvas.drawBitmap(Bitmap, x1, y1, x2, y2);

So I could then call:

canvas.drawBitmap(myBitmap, 0, 0, 15, 15);

... which will then paint my Bitmap double size (pixels wise!) on the canvas (screen).

Has anyone got a solution for this? I would be very grateful.

Many thanks

Steve.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones