Create a bitmap using double values ​​instead of int android -


in code need create bitmap using double values. it´s important use correct value.

i´m using:

bitmap bmp = bitmap.createbitmap(int, int, bitmap.config.argb_8888); 

... when need like:

bitmap bmp = bitmap.createbitmap(double, double, bitmap.config.argb_8888); 

everything i've trying make conversion ( possible ? ) returns initial value or integer

how can use double values ​​when creating bitmap ?

thanks in advance.

regards.

perhaps misunderstand question, bitmaps rasters of whole pixels. can't have fractions of pixels, can have integer numbers of rows , columns in parameters createbitmap.

having said that, can rescale how bitmap drawn using float scale factors applied via matrix drawbitmap methods, e.g.

canvas.drawbitmap(bitmap bitmap, matrix matrix, paint paint)

matrix matrix = new android.graphics.matrix(); matrix.postscale(3.14f, 3.14f); canvas.drawbitmap(bitmap, matrix, paint); 

however, when comes rendering on screen, again draw whole pixels, still don't fractional pixels displayed.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -